188 posts
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Sells items exclusively on Envato Market
+1 more
The_Silverman
says

Hey guys a quick question: I’ve seen a couple of WordPress themes that have two or more blog page styles and they are showcasing all on the theme demo even though in the theme package they don’t have multiple blog pages/templates and changing the way the blog looks is done by changing an option on the theme options page. How is that possible, or how can one do that? Thanks.

391 posts icypixels.com
  • Had an item that became a weekly top seller
  • Won a competition
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
+7 more
icypixels
says

I think it’s a switch case scenario :)

188 posts
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Sells items exclusively on Envato Market
+1 more
The_Silverman
says

Hehe, pai nah, more intel on that ?! :)

391 posts icypixels.com
  • Had an item that became a weekly top seller
  • Won a competition
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
+7 more
icypixels
says

Let’s say you have a dropdown option in your theme options panel… And you’ll do a small switch case like this, in your index.php:

Retrieve your setting from the option panel and save it inside a variable, which will be called $dropdown_option for demo purposes:

switch ($dropdown_option) {
    case "0":
    // Oh great, the first option in the dropdown is selected, do some nifty stuff here with the blog
    break;
    case "1":
    // Now figure out a second layout for your blog :))
    break;
    default:
    // A default solution will be needed.
    break;
}

Have it all figured in your mind now? :)

188 posts
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Sells items exclusively on Envato Market
+1 more
The_Silverman
says

Hmm not really, how do you output those options and have them posted on a new page? I thought about building a shortcode for the second, third… blog pages but you seem to think of a better way.

110 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 1+ items on Envato Market
+5 more
designedbydash
says

It’s likely a custom shortcode/page template just on the demo using get_posts() or WP Query.

188 posts
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Sells items exclusively on Envato Market
+1 more
The_Silverman
says

Hmm…

1361 posts
  • Had an item that became a weekly top seller
  • Has been part of the Envato Community for over 4 years
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+5 more
Smartik
says

I’m using metaboxes for that.

188 posts
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Sells items exclusively on Envato Market
+1 more
The_Silverman
says

I think it’s a switch case scenario :)

I’m really curious about this. Where can I see an example? Thanks.

188 posts
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Sells items exclusively on Envato Market
+1 more
The_Silverman
says

Well, I’m not quite sure on how some of the great TF authors do their magic related to this subject but after some time thinking I came up with a solution: I’ll implement the blog design change options in the theme options page and only for my theme demo I’ll build a WP_Query shortcode. That way I don’t have to create multiple blog templates.

by
by
by
by
by
by