WordPress.org

Ready to get started?Download WordPress

Forums

An index as well as stylesheet switcher (2 posts)

  1. goodsnake
    Member
    Posted 9 years ago #

    Everytime I change my site design, I end up playing with the index as well as the stylesheet. I was wondering if anyone has a style and index.php styleswitcher? Before I get a friend to write one for me, thought I would make sure it hasn't been done before.

  2. TechGnome
    Moderator
    Posted 9 years ago #

    Except that he wants "a style and index.php styleswitcher" not just a style switcher. It is possible, but it isn't easy and it can become a mess. You would need a copy of the index.php file for every style you supply. Then in you main index.php, this is all that would be there:

    <?php
    $blog = 1;
    include ("wp-blog-header.php");
    include ( -set this to the path to the index.php you do want, based on the style name );
    %>

    The every thing would be in the individual files for each style. Here's the kicker. If you want to change something, it has to be changed in every single one of those files.
    TG

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.