• Resolved ariane98

    (@ariane98)


    Hi
    I love Sela and use it a lot
    I added events manager and noticed that events were not found by my search box so I added a function :
    `
    function rc_add_cpts_to_search($query) {
    // Check to verify it’s search page
    if( is_search() ) {
    // Get post types
    $post_types = get_post_types(array(‘public’ => true, ‘exclude_from_search’ => false), ‘objects’);
    $searchable_types = array();
    // Add available post types
    if( $post_types ) {
    foreach( $post_types as $type) {
    $searchable_types[] = $type->name;
    }
    }
    $query->set( ‘post_type’, $searchable_types );
    }
    return $query;
    }
    add_action( ‘pre_get_posts’, ‘rc_add_cpts_to_search’ );
    ?>

    Now events are found like other posts BUT the results page have no navigation bar
    I reckon this is not a bug from Sela, but I guess there must be an simple way to solve this issue ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Could you please provide a link to your events page so I can take a look directly?

    I’m not familiar with that plugin, do you know what template your events page is set to use?

    Thread Starter ariane98

    (@ariane98)

    Hi Kathryn
    Here is the link : http://www.fabolic.org/Vdt
    The page missing navbar is not the events page but the page showing the results of the wordpress search function (with the “add-on” function mentioned earlier to retrieve any page, post, event…containing the keyword) ex:http://www.fabolic.org/Vdt/?s=poney

    Moderator Kathryn Presner

    (@zoonini)

    I can see the missing top parts of the page in the browser source, so it’s being output, but not being displayed.

    To narrow down the culrpit, here are some troubleshooting steps you can try:

    – try deactivatating your events manager plugin and see if that fixes the issue
    – try removing the function you added to your child theme, though nothing there looks problematic to me
    – try removing piece by piece all the customizations you’ve added to your child theme
    – try deactivating all your plugins

    By trying each of these one at a time, you may find the culprit.

    Let me know how it goes.

    Thread Starter ariane98

    (@ariane98)

    Hi Kathryn
    thank you for your help.
    The problem is solved (but I must say the mystery remains…)

    • This reply was modified 9 years, 7 months ago by ariane98.
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘search page missing navigation menu’ is closed to new replies.