182 posts
  • Has been a member for 4-5 years
  • Exclusive Author
  • Europe
  • Bought between 10 and 49 items
  • Sold between 10 000 and 50 000 dollars
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.

269 posts New Elite in Town!
  • Won a Competition
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Romania
  • Has been a member for 2-3 years
  • Exclusive Author
  • Bought between 10 and 49 items
+1 more
icypixels says

I think it’s a switch case scenario :)

182 posts
  • Has been a member for 4-5 years
  • Exclusive Author
  • Europe
  • Bought between 10 and 49 items
  • Sold between 10 000 and 50 000 dollars
The_Silverman says

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

269 posts New Elite in Town!
  • Won a Competition
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Romania
  • Has been a member for 2-3 years
  • Exclusive Author
  • Bought between 10 and 49 items
+1 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? :)

182 posts
  • Has been a member for 4-5 years
  • Exclusive Author
  • Europe
  • Bought between 10 and 49 items
  • Sold between 10 000 and 50 000 dollars
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.

108 posts
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • United Kingdom
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Referred between 1 and 9 users
  • Bought between 1 and 9 items
  • Has been a member for 1-2 years
designedbydash says

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

182 posts
  • Has been a member for 4-5 years
  • Exclusive Author
  • Europe
  • Bought between 10 and 49 items
  • Sold between 10 000 and 50 000 dollars
The_Silverman says

Hmm…

1070 posts
  • Forum Superstar
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Referred between 50 and 99 users
  • Europe
  • Has been a member for 3-4 years
  • Exclusive Author
+1 more
Smartik says

I’m using metaboxes for that.

182 posts
  • Has been a member for 4-5 years
  • Exclusive Author
  • Europe
  • Bought between 10 and 49 items
  • Sold between 10 000 and 50 000 dollars
The_Silverman says

I think it’s a switch case scenario :)

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

182 posts
  • Has been a member for 4-5 years
  • Exclusive Author
  • Europe
  • Bought between 10 and 49 items
  • Sold between 10 000 and 50 000 dollars
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