Responsive WordPress Theme – Caliber

A theme with simple controls and limitless potential. Work fast and build an amazing website!   Find out more »

UpThemes – Beautiful WordPress Themes

Create a site your church, gallery, newspaper, blog, recipes, band and more!   See the themes »

Need a little help?  Find answers quickly by searching the forum.
Group Admins
  • andy
  • jeffw
  • admin

Support for: Moxie – Responsive Theme for WordPress

Moxie

Public Group  |  active 4 years, 4 months ago ago
Viewing post 1 to 7 (7 total posts)

Searching the site not working properly

  • rucreveling

    said

    Hello –

    The search feature on the site is not working properly; it seems only text added on “regular” pages shows up in searches – not anything built using static blocks or the visual composer. It’s important for everything on the site to be “searchable” and it wasn’t brought to my attention that this wasn’t working until the entire site was built. Of course 99% of the site was built using all the awesome Moxie features that don’t seem to play nice with searching. Please tell me there’s a way to search the site and I’m just missing something!!!

    I have taken the search bar off because it’s so ineffective and the store owner is very upset. I put it back (bottom of the homepage) so you can test it. Please help!

    http://vlamisliquor.com/

  • jeffw

    said

    Hi, rucreveling.

    If you want to set the scope of a search box you can add hidden inputs that tell the search form to display certain post types on the search results page. For example, adding the following to a search form would limit the output to posts, pages and static blocks – i.e. the ‘post’ and ‘page’ and ‘static-block’ post types – it wouldn’t output any items that are the ‘portfolio’ post type:

    <input type="hidden" value="post" name="post_type" id="post_type" />
    <input type="hidden" value="page" name="post_type" id="post_type" />
    <input type="hidden" value="static-block" name="post_type" id="post_type" />

    This is standard WordPress functionality, it isn’t really related to the theme you are using. I think the default search form behaviour is to return ‘post’ and ‘page’ post types only. But the standard WordPress search won’t look inside shortcodes, so any content that is within shortcodes (and this includes all Visual Composer elements) will not be searched. This is just how WordPress works, unfortunately; it is a limitation of page builders that work by creating shortcodes for their content elements.

         get_search_form code referencehttps://developer.wordpress.org/reference/functions/get_search_form/#user-contributed-notes

    There are plugins out there that enable shortcode content to be searchable. WPSearch, for example → https://searchwp.com

    There may be others, I’ve not looked recently.

  • hafler

    said

    Hello, sorry to post on this old thread but after search I don’t find something similar as my problem.
    Let’s start with the beginning: When I go to Google Search Console — Coverage — Crawled – currently not indexed, it show me a lot of spam links like this:
    https://yoursite.net/search/大奖代理Q82019309.com/feed/rss2/
    https://yoursite.net/search/大奖老虎机好玩吗场 Q82019309.com.com/feed/rss2/
    ETC
    the Chinese characters are constantly changing but the core syntax like …/search/…Q82019309.com/feed/rss2/ remain.
    After I searched internet for solutions, I hope that after I Disallow Search In Robots.Txt
    and Disable Search On yoursite.net will cause unwanted links to disappear.
    So, can you tell me the code for theme’s functions.php so the search to be disabled?
    Thank You.

  • jeffw

    said

    I don’t think this has anything at all to do with the Moxie theme.

    If you add this to your ‘robots.txt’ file…

    Disallow: /search

    …it asks bots, crawlers and spiders to not access anything within the ‘search’ folder in the root of your web space.

    I have no idea why you have a ‘search’ folder in the root of your web space, it is not put there by the Moxie theme, and neither does WordPress add a ‘search’ folder. Perhaps you have installed a plugin that adds that folder?

    If you need to, you can disable the WordPress search functionality with a plugin. Like this one, for example → https://wordpress.org/plugins/disable-search/

    Though I’m pretty sure that will not help with your issue.

    As I say, this is not a theme issue. The best places to ask about this will be in the appropriate WordPress and Google support forums…

         WordPress support forumshttps://wordpress.org/support/welcome/
         Google support forumshttps://productforums.google.com/forum/#!home

    If there is anything else about the Moxie theme itself you need help with, please just let us know. If you can’t find a solution using the forum search please create a new topic for each separate issue and we’ll do our best to help.

    Please try to remember to start a new topic for each separate issue that you have. We like to keep each topic in the Help Center focused on a single subject. We find that separating each question into a separate topic keeps the information much clearer and easier to follow. Also, it really helps other users to find information and it prevents threads from wandering down Tangent Lane. If you can’t find a solution using the forum search, please always create a new topic for each separate issue that you have.

    Thanks.

  • jeffw

    said

    @hafler

    Look at this…

         

    The “Q82019309.com” domain in your spammy links is a malware infected site.

         → https://transparencyreport.google.com/safe-browsing/search?url=q82019309.com&hl=en-GB

    Unfortunately, it looks like your site may also have been hacked; that is most likely the reason why Google is crawling those spammy links.

    A quick Google search for “Q82019309.com” reveals that your’s may not be the only site that has been compromised in this way.

    References:
    https://developers.google.com/web/fundamentals/security/hacked/

  • hafler

    said

    I don’t have a “search” folder in the root of my web space, and I don’t see any Security Issues in the search conslole but I will try that plugin to see if the spammy links begin to disappear.
    Think the problem is also related with /feed/rss2/

    Do you think is better to add this to function.php than to install that plugin?
    [CODE] /*---------------------------------------------------*/
    /*  SEARCH PAGES WITHOUT RESULTS SEND 404 HTTP CODE  */
    /*---------------------------------------------------*/
    function wisepops_search_404_code() {
        if (is_search() && !have_posts()) {
            header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
            $GLOBALS['wp_query']->is_404 = true;
        }
    }
    add_action('get_header', 'wisepops_search_404_code');[/CODE]

    soruce https://www.sycosure.com/blog/soft-404-crawl-error-search-spam/

  • jeffw

    said

    Your problem doesn’t have anything at all to do with the Moxie theme.

    Just search the internet for “search/大奖代理Q82019309.com/feed/rss2/” and you will see what I mean…

         

    You’ll find page after page after page of websites that have the same problem, and I can’t find any site in the first 10 pages that is using our Moxie theme. So it is not an issue with Moxie, and in this forum we can help only with issues that are directly related to the Moxie theme.

    However, the sites I looked at were all powered by WordPress. So it appears to be a WordPress related issue.

    For generic questions about WordPress that are not theme related you can ask for help in the appropriate WordPress support forum…
         → https://wordpress.org/support/welcome/

    Or you can try asking in the appropriate Google support forum. → https://productforums.google.com/forum/#!home

    Thanks.

Viewing post 1 to 7 (7 total posts)
Topic tags: search bar