Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3930

    Hi,

    I would like to add a (single) fullsize banner on top of the (double) sidebar that just works on articles and not on the homepage.

    Thanks for any help.

    #44226

    Hey,

    The easiest way to do this would be to manually add it to sidebar.php and use WordPress Conditional Tags to dynamically select which pages this banner should show up on.

    Open up sidebar.php and find this code (should be right at the top):

    if ($k_option['custom']['bodyclass'] == "") // check if its a full width page, if full width dont show the sidebar content
    {

    Immediately under it add:

    if (is_single()) {
    echo '<div class="sidebar fullwidth_sidebar">';
    echo '<a href="YOUR-LINK" title="YOUR-LINK-HOVER-TEXT"><img src="YOUR-IMAGE-URL" alt="YOUR-IMAGE-ALT-TEXT" /></a>';
    echo '</div>';
    }

    Update everything in CAPITALS to your info. You can adjust which pages this shows up on by adding / removing / editing the 1st line which is the conditional code that, as it is, will only show this area on single pages.

    James

    #44227

    Hi James,

    that works perfect!

    Thanks a lot for your help,

    Thomas

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Add banner to sidebar’ is closed to new replies.