159 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $5,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Located in Europe
+1 more
peex says

That is an easy one :)

Just make a category for example “portfolio” and then make a category specific page for it. You can make this with your category id. Let’s say your “portfolio” category id is “6” then you have make a file called “category-6.php” and then you can design it as you wish :) When user clicked on your portfolio category they can see the posts how you want to show.

But there is a problem here. Users can already see your portfolio posts on the homepage or archive pages right? Yeah so what can you do :) Well that is an easy one too. You must exclude your “portfolio” category posts from homepage a.k.a index.php and your archive pages. You can do this with query_posts() function in WordPress.

Simply put this code before the “loop”

<?php if (is_home() || is_archive()) { query_posts(‘cat=-6’); } ?>

This will exclude category 6 which we called “portfolio” from homepage and archive pages.

Check this official WP link for more information on query_posts.

Here is some other useful links for this matter:

http://ifelse.co.uk/archives/2005/04/08/query_posts-redux/

http://codex.wordpress.org/The_Loop

I hope i can help you a little :)

171 posts
  • Has referred 100+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Had an item featured on Envato Market
+4 more
clarklab says

Query posts is unbelievably useful. You can use it to complete ditch the loop.

145 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+3 more
JJenZz says

I thought this might happen… I am awful at explaining things!

Peex, the solution you have explained is for a problem I am not having. I know how to do what you have explained and have already created a portfolio category for portfolio items.

The difference in my case is that my portfolio is on the homepage, not in it’s own portfolio page. Therefore, the BLOG is NOT on the homepage. However, because wordpress is installed in the root directory all blog links do not contain ”/blog/”.

So, I have a “blog” button in my navigation but all blog entries currently exist at “http://myurl.com/yyyy/mm/dd/blog-post-title” which assumes the blog lives on the hompage. It doesn’t, so I need the URLs to be “http://myurl.com/blog/yyyy/mm/dd/blog-post-title”.

My problem isn’t with the portfolio and portfolio items… It’s simply with the structure of the blog URL .

I did manage to solve the problem though (as explained in a previous post) but am eager to hear of a more efficient solution (if one exists).

159 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $5,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Located in Europe
+1 more
peex says

Then i think you must mess with the permalinks in wordpress admin panel :)

145 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+3 more
JJenZz says

Yeah, that is what I did :)

Thanks for your help!

by
by
by
by
by
by