688 posts
  • Has been part of the Envato Community for over 7 years
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more

Well i started this thread to talk about post_types and something i´m understanding.

When you create a new post_type, you are creating more like a Page than like a Post. In fact, “posts” are the ones already there, but, a post_type, a new one, it´s in fact a page.

So, when you create a post_type you “think” that are creating a new “post” but is not. You are creating a new page.

Pages, for example, are not included on the rss and in the blog archive same way as Posts (native ones) does.

Yes i know is very easy for a common user to use an admin menu with custom post_type defined, let´s say, for a book store, it´s very usable that you have a “Books” type and not “Posts” like default.

You can see a big point on this here:


So, what you think?

2468 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $100+ on Envato Market
  • Has referred 100+ members
  • Has been a beta tester for an Envato feature
+3 more

Yeah, they’re more like pages, indeed…

Well, I think it’s a great step forward, but they need to make many improvements. Hopefully WP 3 .1 will bring some changes :)

3520 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Located in United States
  • Helps us moderate the forums
+10 more

I see what you’re saying, but I don’t see this as a problem. Some of this confusion comes from the choice of “post_type” as the name, which I agree is a misnomer – really it should be “content_type”, but there’s some legacy naming at work here I presume.

So you have a bunch of content types including Post and Page. You might create another, like “Event” or “Review”.

Out of the box, WordPress lists the content of type Post (only) in the blog. That makes sense. But there’s nothing inherent about “Posts” as fas as I know that “makes them show up in the blog” – rather, when the Loop is created, only contents of type Post are queried. If you’d rather the blog included just “Reviews”, or “Reviews” AND “Events”, or any combination of content types, you can just use the query_posts functionality to change this. For example:

query_posts( array('post_type' => array( 'post', 'event', 'review') ) );

Put that before the loop, and you get all of Posts, Reviews, and Events in your blog. You can read more about it and all the options here: http://codex.wordpress.org/Function_Reference/query_posts . I believe this is a very simple way to achieve that functionality – it simply overrides the default.

From the Codex:

query_posts() can be used to control which posts show up in The Loop. ... You can customize the presentation of your blog entries by combining it with page logic (like the Conditional Tags)—all without changing any of the URLs.

So it’s not that new custom content types are inherently “like” Pages or Posts – they’re all the same really – but Posts are just the only ones queried by default.

Now, perhaps it’d be nice to build this option into the Control Panel – i.e. “Check which content types to include in your blog” – but I suppose if you’re savvy enough to be using custom content types at this point, you’re able to add a query_posts() line to your theme.

Perhaps it’ll just be a slow transition for people to wrap their heads around the expanding, and perhaps overloaded, concept of a ‘post’ in WordPress – but I think this is a great step toward making WordPress a more robust CMS for those who need it, while still keeping it simple and streamlined for the average user :)

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes