Jump to content

Archived

This topic is now archived and is closed to further replies.

williamweber

Possible to exclude post types from a WP Content Loop

Recommended Posts

williamweber

I'm wondering if it's possible to exclude certain types of posts from a post loop or only show certain ones.

 

What I would like to do is exclude "Link" posts on my main blog page and then have a different page that just displays those Link type posts.

 

I know this isn't possible with any of selectable options but I'm hoping someone could point me toward how to go about this using some code (if it's even possible).

 

Thanks.

Share this post


Link to post
Share on other sites
jennalyn11

Hi, I've used the Filtering plugin from the Pagelines store successfully for this purpose 

Share this post


Link to post
Share on other sites
Danny

Thanks for sharing jennalyn11


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
williamweber

Hi, I've used the Filtering plugin from the Pagelines store successfully for this purpose 

Thanks jennalyn11 I'll take a look. I was hoping to avoid additional purchases but that plugin looks promising.

Share this post


Link to post
Share on other sites
Danny

williamweber - This kind of functionality is usually plugin territory. I have never seen a theme provide options to filter out a category or post type from the loop.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
williamweber

I understand and it definitely makes sense as a plugin since the majority of people wouldn't be interested in this. Not being a web developer by trade I was just curious if it was something that could be done relatively easily. The suggested plugin would certainly do what I want but it also looks like it doesn't a great deal more than I need. Ultimately I just want to exclude links from my main post loop and then create another page that only shows those link posts.

 

I can also solve this by just not using posts for the links and just adding them manually to another page. Which is likely the way I'll end up going. But I was interested in taking advantage of some of the built in formatting for those "link" post-types, since I like they way they appear in DMS2. I lose that by just using a page of manually entered links but I have a feeling I loose it by using the "Filtering" plugin as well since it will replace the built in post loop and not just add an option to it. 

 

So it seems my only options to keep the new styling are modifying code in the built in DMS2 post loop (not desireable for a ton of reasons) or just leaving the Link posts in my main post loop, which in what I have planned clutters up the post loop.

 

I do appreciate the suggestions. I'll have to keep thinking on it.

Share this post


Link to post
Share on other sites

  • Similar Content

    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
    • flourishdesignstudio
      By flourishdesignstudio+
      My DMS 2 site http://www.heart-stone.com/ will not save any new custom css... I can still edit templates and publish those but any custom css that I enter never saves.
      All WP files, themes, and plugins are up to date. 
      Any thought about what might be causing this?
    • flourishdesignstudio
      By flourishdesignstudio+
      Is there a way to edit the custom CSS via FTP? I know I can edit the custom code in the Chrome editor but is there a file path I can use to find and edit the CSS directly from our FTP?
      Thanks in advance for the help!
    • nizami
      By nizami+
      Using navbar section with correctly configured WP menu to display main navigation at https://elenaangel.com. 
      All fine in desktop viewport. Menu displays twice in hamburger mode. How to fix this please? 

×