• I am using sem-recent-posts on my home page, and I’d like to exclude any post from category 10 from showing up in recent posts.

    Is this possible?

    One potential wrinkle is that my client wanted an “all publications” category. So every single post that is in category 10 is also in the “all publications” category and perhaps in at least one other category as well.

    Any help is much appreciated. Thank you in advance.

Viewing 15 replies - 1 through 15 (of 16 total)
  • I would like to know a solution to this one too.

    use the opt-in front plugin, and the recent posts will only be those form the main category

    Thank you.
    And it even works with the Static Front Page plugin.

    It does work when dispaying archives and posts.
    But it does not work when displaying a diffent page, other than the front page (with stactic front page). Is there any way to fix this?

    i’m not sure of what you mean. care to put a few links?

    Of coz..

    The site is in danish, so I guess it won’t make much sense.

    Im using the Static Front Page, Opt in and the sem-recent-posts plugins.

    Recent posts are displayed in the sidebar under the heading: Seneste indl?g
    https://www.ekstremisme.dk/

    https://www.ekstremisme.dk/?page_id=2

    In the second page the most recent post (Konference: Islamism and European Security) is not posted in the blog category, and should not show up in the recent post list.

    ok, now I see what you mean. I’ll look into this when I’ll have some time on my hands. thanks for the bug report.

    Thread Starter joshkaufman

    (@joshkaufman)

    Thank you for your wonderful plugins and your help Denis.

    I have finally got my clients site up and running. It was a complete overhaul of a static HTML page to a WordPress site. They are a research organization and release a lot of content. They also had a lot of back-content to migrate.

    Take a look:)
    https://www.dcfpi.org/

    Is there it possible to to exclude a certain Category from being displayed as a plugin hack?

    Either to identify the category as in
    <?php if ( !(in_category('28')) ) { ?>

    Or to eliminate it from thw query
    <?php
    query_posts('cat=-1');
    ?>

    Maybe this will do, but I have no clue as to where the code should be placed….

    INNER JOIN $wpdb->post2cat ON ($wpdb->posts.ID = $wpdb->post2cat.post_ID) AND ($wpdb->post2cat.category_id != Category ID number here)

    That didnt work either.

    Are there any Recent Post plugins that allows the exclusion of a category?

    I’m just throwing this out there in the off chance it might help: I too converted an old static HTML site to WordPress, migrated a lot of content. I also have a wordpress blog.

    On each site, I selectively display recent posts in the sidebar, excluding some categories. I dont use any plugins to achieve the selectivity.

    You can do a Selective Display of recent posts with a single WP Query, by specifying the categories eligible for display. This has the effect of excluding all unspecified categories.

    My approach might not work for you though, because my categories are complete and unchanging. The code would have to be tweaked if I decided to Add a Category.

    Here’s my Selective Recent Posts query from my sidebar, where I specify the categories eligible for the Recent Posts list (remove extra spaces from the code to use)

    code
    < ? php query _ posts (“cat=14,3,17,4,6,1,10,13,8,2,18&showposts=10”); ? >
    /code

    Variations of this code are in the sidebar on my formerly HTML site at https://www.TimsLaw.com, and on my political journal at https://www.RadMod.com.

    Thank you. I’ll certainly give it try.

    I’m a newbie here. How do I make the display of the recent posts a bulleted list?

    dockboggs:
    I guess this plug in can to that. It allows you to define a text to be displayed before the link to the recent post.

    https://dev.wp-plugins.org/browser/recent-posts/

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Categorical Conditions for Recent Posts’ is closed to new replies.