WordPress.org

Ready to get started?Download WordPress

Forums

Meteor Slides
[resolved] Search results for slides (4 posts)

  1. russbloomquist
    Member
    Posted 3 years ago #

    First off I love meteor-slides. :)

    I have a quick question.

    The slides show up in WP search results with a link to the Permalink location and not the slide link location. Is there a quick way to fix this?

    Thanks, Russ

  2. russbloomquist
    Member
    Posted 3 years ago #

    Never mind.

  3. russbloomquist
    Member
    Posted 3 years ago #

    I noticed that the slides are stored in the database as post_type=slide so I just added this to my theme functions.

    function SearchFilter($query) {
      if ($query->is_search) {
        // Insert the specific post types you want to search
        $query->set('post_type', array('post', 'page'));
      }
      return $query;
    }
    
    add_filter('pre_get_posts','SearchFilter');

    So, now post_type slide is being excluded.

  4. Josh Leuze
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Russ, thanks for trying my plugin. I hadn't actually considered that these slides might show up in search!

    Thanks for sharing your solution, I'll make sure that the next version of Meteor Slides fixes this issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic