• I was wondering how I go about adding additional HTML code to the side bar only when using the singlepost template. My php knowledge is very limited so it is no surprise I tried and failed. I would love if someone could help me please.

    The code of the themes sidebar I’m using at the moment is:

    <div id="sidebar">
    <?php if(is_active_sidebar(3)) : ?>
    <ul class="clearfix"><?php if (function_exists('dynamic_sidebar') && dynamic_sidebar(3) ); ?>
    <?php endif; ?>
    <?php if(is_active_sidebar(4)) : ?>
    <ul class="clearfix"><?php if (function_exists('dynamic_sidebar') && dynamic_sidebar(4) ); ?>
    <?php endif; ?>
    </div>

    Thanks

Viewing 1 replies (of 1 total)
  • You have to create an alternative sidebar such as alt_sidebar.php and include this alternative sidebar in your single.php file instead of the “normal” sidebar.

Viewing 1 replies (of 1 total)
  • The topic ‘How to add more to sidebar on single post template’ is closed to new replies.