Support » Themes and Templates » Sidebar For author.php Page is Using Different CSS than Main Page

  • I’m using a heavily customized version of the clean-home theme on a website I’m building. I have several different sidebar and header files to load different widgets depending on what part of the site a user is looking at.

    I’m using a standalone sidebar-author.php file that is distinct from the sidebar.php file only in name and what widgets get used, and it’s working, but the sidebar-author.php version is somehow getting different css tags applied to its widgets, breaking the consistency of the look from sidebar to sidebar. For example:

    Correct:
    http://double7images.com/
    Incorrect:
    http://double7images.com/author/benjamin-ahr-harrison

    I have looked through the associated header-author.php and author.php files to see if one of them is causing the problem and can’t turn anything up. Anyone ever seen this before?

Viewing 5 replies - 1 through 5 (of 5 total)
  • sidebar-author.php file that is distinct from the sidebar.php file only in name and what widgets get used

    double check if this is true;

    for instance, the ‘normal’ sidebar starts with:

    <div id="sidebar">
    	<div class="block search-3 widget_search"><form role="search" method="get" id="searchform" action="http://double7images.com/" >
    	<div><label class="screen-reader-text" for="s">Search for:</label>
    	<input type="text" value="" name="s" id="s" />
    	<input type="submit" id="searchsubmit" value="Search" />
    	</div>
    	</form></div>

    and every widgets seems to start with <div class="block ....
    and has a h3 tag as title.

    while the same area in the author sidebar is:

    <div id="sidebar">
    	<form role="search" method="get" id="searchform" action="http://double7images.com/" >
    	<div><label class="screen-reader-text" for="s">Search for:</label>
    
    	<input type="text" value="" name="s" id="s" />
    	<input type="submit" id="searchsubmit" value="Search" />
    	</div>

    and the widgets semm to have no wrapping div, no h3 title tag …

    Thread Starter axo1ot1

    (@axo1ot1)

    Yeah that’s definitely what’s behind them displaying differently, but I can’t figure out where in the theme file that’s being determined. The sidebar.php and sidebar-author.php files are literally identical other than the set of widgets they use.

    Have you checked with firebug? Select the part of the page that’s using styles different from what you intended, and on the bottom right, firebug will tell you the line number and filename of each rule in effect.

    check in functions.php of your theme, if the register code for the sidebars is also identical.

    http://codex.wordpress.org/Function_Reference/register_sidebar

    Thread Starter axo1ot1

    (@axo1ot1)

    Oh nice. The functions.php file was the problem. Thanks very much!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sidebar For author.php Page is Using Different CSS than Main Page’ is closed to new replies.