Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author WebberZone

    (@webberzone)

    It definitely seems like it’s pulling out all the Event post types which is strange.

    Can you post a screenshot of your settings page?

    Thread Starter cjdavey

    (@cjdavey)

    Thanks! Here you go!.

    Plugin Author WebberZone

    (@webberzone)

    All this does look perfectly fine to me. Assuming you get the same results if you select just post?

    Only way to figure out what query is running is to install Query Monitor plugin and then see what query is run on your search results page.

    Thread Starter cjdavey

    (@cjdavey)

    Yes, selecting just post doesn’t affect it.

    Here are the Better Search queries:

    SELECT option_value
    FROM wp_options
    WHERE option_name = '_transient_timeout_bs_voiceforlife'
    LIMIT 1
    SELECT option_value
    FROM wp_options
    WHERE option_name = '_transient_bs_voiceforlife'
    LIMIT 1
    SELECT DISTINCT ID, (MATCH(post_title) AGAINST ('voice for life' IN BOOLEAN MODE ) * 10 ) + (MATCH(post_content) AGAINST ('voice for life' IN BOOLEAN MODE ) * 1 ) AS score
    FROM wp_posts
    WHERE 1=1
    AND MATCH (post_title,post_content) AGAINST ('voice for life' IN BOOLEAN MODE )
    AND (post_status = 'publish'
    OR post_status = 'inherit')
    AND wp_posts.post_type IN ('post', 'page', 'areas', 'area_page')
    ORDER BY score DESC
    SELECT DISTINCT ID, (MATCH(post_title) AGAINST ('voice for life' IN BOOLEAN MODE ) * 10 ) + (MATCH(post_content) AGAINST ('voice for life' IN BOOLEAN MODE ) * 1 ) AS score
    FROM wp_posts
    WHERE 1=1
    AND MATCH (post_title,post_content) AGAINST ('voice for life' IN BOOLEAN MODE )
    AND (post_status = 'publish'
    OR post_status = 'inherit')
    AND wp_posts.post_type IN ('post', 'page', 'areas', 'area_page')
    ORDER BY score DESC
    SELECT DISTINCT wp1.searchvar, wp2.sumCount
    FROM wp_bsearch_daily wp1, (SELECT searchvar, SUM(cntaccess) as sumCount
    FROM wp_bsearch_daily
    WHERE dp_date >= '2016-01-27'
    GROUP BY searchvar
    ORDER BY sumCount DESC
    LIMIT 30) wp2
    WHERE wp1.searchvar = wp2.searchvar
    ORDER by wp1.searchvar ASC
    Plugin Author WebberZone

    (@webberzone)

    The queries look perfectly fine to me. You’ll note the post_type clause in there which only pulls up the post, page, area and area_page only and no events.

    Can you check if the cache is disabled in the settings page.

    Lastly can you run these queries in phpMyAdmin or Adminer and see what the outputs are. Do you get the same hits as your results page?

    Thread Starter cjdavey

    (@cjdavey)

    Yes, I noticed that!

    Cache is disabled, and I’ve cleared it (more than once).

    I’ll see if I can get the queries run; certainly changing other settings (boolean mode, title/body weighting) does change search results, so the plugin is doing something!

    Plugin Author WebberZone

    (@webberzone)

    Adminer has a WordPress plugin that I use for debugging. You can run the queries there and see

    Thread Starter cjdavey

    (@cjdavey)

    Thanks!

    Thread Starter cjdavey

    (@cjdavey)

    Ok, that’s interesting. Results for that query are correct…

    I’ll go back to Query Monitor and see what else is running queries on the page.

    Plugin Author WebberZone

    (@webberzone)

    Few things worth trying are resetting settings completely, and deleting and readding the plugin via the Plugins page in Admin

    Thread Starter cjdavey

    (@cjdavey)

    I’ve found the queries that are adding the events, and I’m now fairly confident they’re part of the theme/site build rather than the plugin – so I’ll mark this one resolved.

    Thanks for your help in getting this far!

    Plugin Author WebberZone

    (@webberzone)

    You’re welcome.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Excluding custom page types’ is closed to new replies.