• I want to make a dynamic sidebar. Means I want pictures like an envelope for contact and so on. I want that the picture switches from picture to another picture

    Is that possible?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I assume you are making a custom theme.

    In your page files (index.php, post.php, page.php etc) you should create a div that will be the sidebar.

    (Usually I use a php include (include("sidebar.php");) so I only need the code once and when I edit the sidebar it applies to all pages.)

    Inside the sidebar div input the code that you want.

    e.g. a javascript script to have rotating images.

    If you want to have widgets in your sidebar you need to create another file in your theme folder called functions.php.

    In this functions file put this code:

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebar();
    ?>

    Then, in your sidebar div put this code:

    <ul>
    
    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar() ) : else : ?>
    
    <?php endif; ?>
    
    </ul>

    This will add widgets to your sidebar as chosen from the wp admin panel.

    You will of course need to style the sidebar div accordingly to make it float left or right.

    Thread Starter riddle81

    (@riddle81)

    I didn′t want to use the categories as links i wanted to link to certain pages….or the Contact form 7….

    so you want to make a navigation bar?

    Just add the “pages” widget to your sidebar in wp-admin and use css to style the list.

    Thread Starter riddle81

    (@riddle81)

    Okay thanks will try that. ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sidebar help’ is closed to new replies.