Support » Plugins » Theme Switcher: New Page?

  • I am using Ryan Boren’s theme switcher and I want to make a new page that will switch themes as well, but I don’t want to use WP’s page option. Is this possible? If so, what piece of coding what I put into the page to make it work? Thanks in advance for any replies.

Viewing 6 replies - 1 through 6 (of 6 total)
  • AijoNeko, I’m sorry but I don’t quite understand what you asking for. When you say “new page,” do you mean an external php document that’s using the WordPress theme feature? If so, you’ll probably need to modify Theme Switcher itself, since it’s coded to redirect to your blog’s home page after a theme is set.

    If you meant something else, please try to elaborate.

    Yes, that’s what I meant. Having it redirect to my blog isn’t a big deal since it’s the main part of my site. However, I still can’t figure out a way to add a page that adheres to the set theme.

    Just trying to understand your request, AijoNeko.
    So, you want to have a “page” in an external php document as Kaf said, but you still want this file to have exactly the same style as your blog, even more, to change its style with the style-switcher…
    Then why not use the Pages feature? It was created (after popular demand) exactly to have “pages” that look exactly like the rest of the blog.
    Maybe I am missing something, but I can’t get why not use the Pages feature? Is there any specific reason?

    I can’t find a way to rename it something.php as I wanted it to. It find it confusing to use page numbers.

    If your server has mode_rewrite enabled then you can use your permalinks and that would result to have page names like
    About permalinks see the Codex:

    AijoNeko, if you can’t implement mod_rewrite like moshu suggests (which if you can, is easiest), then here’s the steps for setting up an external php page to use WordPress theming (and to display your Page content):

    1. First, add this to the top of your php file:

    define('WP_USE_THEMES', true);

    Make sure the path to wp-blog-header.php is correct.

    2. Set up the layout in your file to match that of the templates in your theme. Quickest way to to do this is to copy all the layout and php elements from the theme’s index.php into your file (if the theme has a page.php, use this).

    3. Install my Get-a-Post plugin, and use the get-a-post() tag in place of The Loop in your custom template to call the specific Page to display.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Theme Switcher: New Page?’ is closed to new replies.