• Guys How can I select which categories to show in the homepage?
    I’m using this: [lazy_load_box effect=”slidetop”][posts_grid columns=”4″ rows=”1″ order_by=”date” order=”DESC” thumb_width=”390″ thumb_height=”390″ meta=”yes” excerpt_count=”4″ link=”no” custom_class=”posts-home”][spacer][lazy_load_box effect=”slidetop”]
    someone knows hot to avoid one category?
    thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    What plugin provides that shortcode?

    Thread Starter antoniospecchia

    (@antoniospecchia)

    Good question. No idea… but I’m deciding to cancel that feature and live blog post in their pages only.
    thanks

    Moderator bcworkz

    (@bcworkz)

    You can exclude a category from post queries through the “pre_get_posts” action. Set the “category__not_in” query var to an array of category IDs (even if an array of one) of which to exclude. The only tricky part is to be sure to only do this for the correct query and not all queries. ! is_admin() && $query->is_main_query() is a good start. Try is_front_page() or is_home() as well.

    Thread Starter antoniospecchia

    (@antoniospecchia)

    lovely! thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Post selection in the Homepage’ is closed to new replies.