• I am trying to create a site that when you go to a specific page it has a specific sidebar completly different to other pages…

    is this possible with wp?

    (should i mention now im not a php person … :P)

    ??????

Viewing 6 replies - 1 through 6 (of 6 total)
  • lxg

    (@mastermind)

    of course you can.

    on my site for example you wouldn’t recognize the sidebar as “the WP sidebar”. ?? You need to adapt the colors in the css for the style and also change the Sidebar template in the Template Editor.

    If you want the standard sidebar, but one page should have another one, then you will have to write the page your own (or use the “Write Page” module) and cut out the

    <?php get_sidebar(); ?>

    Then create an own sidebar as you wish. You could e.g. copy the sidebar section from a ready HTML output and adapt it.

    Alex

    Thread Starter stennie

    (@stennie)

    but that means manually writing a page with html right?

    no way to do it automated? if i create another menu (copying the sidebar.php file, rename to sidebar2.php and change the content) how do I change the php on a SPECIFIC page to show this different sidebar and not the ones for the rest of the pages?

    How about making a sidebar2.php like you suggested and then in your original sidebar.php put something like this:
    <?php if ( is_page('page-slug-here') ) {
    include_once('path/to/sidebar2.php');
    } else { ?>
    all the other sidebar content here
    <?php } ?>

    If the sidebars share bits here and there but have some varying content, you can do that on a smaller scale:
    <?php if ( is_page('page-slug-here') ) { ?>
    specific page content here
    <?php } else { ?>
    default content here
    <?php } ?>

    So the answer to your question is YES, you have to get into your files and write the information in your template files and set up the different sidebar looks for each page or category that you want to have the different sidebars.

    Here is some other information to help you do this – it is only as difficult as you make it. Go slow and take everything step by step.

    Customizing Your Sidebar
    Developing Your Post Meta Data Section (sometimes found on the sidebar)
    Stepping Into Template Tags
    WordPress Template Files
    The WordPress Loop in Action
    Conditional Tags

    Thread Starter stennie

    (@stennie)

    my sidebar menus are static … eg i change the sidebar.php file and type my own menus. Would the solution above still be able to do this if they are staic?

    If you take the sidebar.php file and put viable HTML in them, getting rid of all the brilliant category, archive, and Pages template tags, you can have it be anything you want. It doesn’t matter.

    If you want to avoid writing the HTML anchor for every category you add to your site on the sidebar, then you can use the default or class Theme’s sidebar and just copy and paste the tag into your new sidebar. Doesn’t matter. Just put the sidebar you want into the Theme you are using.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘changing the menu’ is closed to new replies.