• Here’s my set up, using Simply Exclude:
    – static front page
    – blog page contains posts from all but 1 category
    – separate page for the excluded category.

    This is all working fine.

    i have created a function in functions.php that allows me to use a shortcode to display the latest post from the excluded category.

    Unfortunately, because this category is excluded from Front/Home, the shortcode function does not pull from the correct category. It does not matter if the shortcode is used on the front page or any other page.

    If i remove the exclusion the correct post gets pulled, of course.

    Is there any way of doing what i’m trying to accomplish?

    i hope this all makes sense.

    Thanks!

    john

    https://www.ads-software.com/plugins/simply-exclude/

Viewing 1 replies (of 1 total)
  • Plugin Author Paul Menard

    (@pmenard)

    @john vivian,

    Sorry for my late replay (3 weeks). Did you come up with a solution?

    Some questions on your function. How are you querying the post(s)? Are you creating your own direct WP_Query instance?

    One thing you could try is to have Simply Exclude only filter on the main query. This would let you create your own WP_Query instances. What I mean by this is in a typical install the Simply Exclude plugin will only filter on the main home/archive/Feed/Search queries. Secondary queries used for widgets, menus, etc and custom functions like your own will not be filtered.

    Try going to Simply Exclude > Settings. Then scroll to the Taxonomy you are working with. For example post categories. Look for the section ‘Query Filtering’. https://screencast.com/t/Vjj2XzXbvx9W

    Let me know.

Viewing 1 replies (of 1 total)
  • The topic ‘Need to pull single post from excluded category’ is closed to new replies.