aresem
Member
Posted 10 months ago #
hi,
i'm having a problem thats been urking me for the last little while. in single posts, my sidebar is the same as the sidebar on the main blog page. how do i customize my single post sidebar? i've been looking right and left and have tried a million things but nothing seems to work.
the reason i need my single post sidebar to be customized is because the sidebar seems to run on too long if i'm posting short posts, thus causing my page to look.. well... weird. to further illustrate my problem, i posted a picture below. someone PLEEEEASE help me!
http://aresem.com/images/sidebar_problem.JPG
roya khosravi
Member
Posted 10 months ago #
1. create a new sidebar, call it sidebar-something.php
2. in single.php add : <?php get_sidebar('something'); ?>
roya khosravi
Member
Posted 10 months ago #
Correction :
1. create a new sidebar, call it sidebar-something.php
2. in single.php
replace <?php get_sidebar(); ?>
by
<?php get_sidebar('something'); ?>
aresem
Member
Posted 10 months ago #
sorry.. i'm a total newb. how do i create a new sidebar php?
Copy your existing sidebar.php to sidebar-something.php and then edit as suggested.
Resources:
Stepping Into Template Tags
Stepping Into Templates
Template Hierarchy
aresem
Member
Posted 10 months ago #
aresem
Member
Posted 10 months ago #
ok i replaced the original sidebar.php with the new one and now i get 2 sidebars...
http://aresem.com/images/sidebar_problem2.JPG