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 have been away for 8 days holidaying in Greece but am now home and looking forward to getting stuck back into converting my first ever WordPress theme. One problem though… the theme I have started trying to integrate includes a portfolio and a blog section and I would like both to be controlled by WordPress.

So far, I can’t figure out if this is possible. The portfolio is on the homepage and I would like the blog to be at ‘www.myurl.com/blog/yyyy/mm/dd/blog-post-title/’ but all blog posts are currently accessed via ‘www.myurl.com/yyyy/mm/dd/blog-post-title/’ (without the ’/blog/’ ) because of the portfolio items.

The portfolio items are blog posts in a portfolio category so they need to be accessible from the homepage but I would like the URL for posts in my blog section to contain ’/blog/’.

I could use a .htaccess file but wasn’t sure if this is a good idea when releasing a theme to the public. Any advice on this? Is this possible? Am I even making sense? lol

Any help on this would be greatly appreciated :)

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

This isn’t looking very promising! No one has any idea how to do this? :(

I may have to make it a portfolio theme only but that’d be a bummer since my heart was set on making it do both!

352 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $10,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+6 more
danharper says

I’m assuming you know how to separate the Portfolio & Blog posts, and have separate layouts for them?

As for keeping /blog/ for blog posts, you could try including all Blog categories under one main ‘Blog’ category.
However I’m not sure if sub-categories display in URLs.

For example, your categories:
  • Portfolio
  • Blog
    • Category 1
    • Another Category
    • etc. etc.

Hope that helps somewhat.

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 have solved this but it might not be the most efficient way to do it. This is what I did:

1) In ‘WordPress settings > Permalinks’ I selected ‘Custom structure’ and entered the following: ’/blog/ year / monthnum / day / postname /’

2) I created a file named blog.php and added the ‘Template name: Blog’ comment to the top of the file.

3) I created a new page in WordPress called Blog and selected the Blog file as the ‘Page Template’.

And that was it! I had to add some extra ‘is_single()’ and ‘is_category()’ checks for my main navigation in order to have the ‘blog’ button highlighted when viewing single posts or categories, but so far so good. Everything seems to be running smoothly.

This is going to be a bit of a pain to explain to potential customers but I haven’t managed to come up with a more efficient solution yet. If you have any better ideas please do let me know!

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

Ah, it’s removed my percent signs from my custom URL structure. Oh well.

Dan – Yes, I already have my portfolio items separated in their own category so differentiating between portfolio items and blog posts isn’t a problem.

Thanks for your suggestion… I’ll give that a try and see if it is easier!

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

Wow, spamming my own topic here :P

I just tried your solution (danharper) and the first roadblock i’ve hit is the way that WordPress structures the category URLs. Using your method, all category URLs look as follows:

http://myurl.com/category/blog/uncategorized/

You can customise the ‘category’ bit in WordPress settings but it doesn’t look as though you can remove it.

Nevermind… my original solution (as long winded as it is) seems to work fine.

Thank you for your help danharper!

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
Wow, spamming my own topic here :P

Haha, I just made a double post in another thread and though ‘oh I wonder if they frown upon that around here?’ I think its totally fair game as long as you have something new to add.

Some places get so bent out of shape about it.

20 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+5 more
Maximus says

Cant wait to see your final product! I just submitted a project just like this for approval (crosses fingers)

:)

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

You did? Ooooh, how did you handle the portfolio and blog side by side with WordPress? Will be interesting to hear your solution to this!

As for my theme, it’s nothing new… I’ve just been converting my NightMedia template into a WordPress theme (and have added a blog section obviously).

20 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+5 more
Maximus says

Very nice. Your ‘NightMedia’ theme was the first one I bought on this site, cant wait for a wordpress theme of it :)

You can accomplish that a few different ways actually, you can create extra theme files, load them as categories and everything else as sub categories, etc…

by
by
by
by
by
by