WordPress.org

Ready to get started?Download WordPress

Forums

Sidebar For author.php Page is Using Different CSS than Main Page (6 posts)

  1. Axo1ot1
    Member
    Posted 3 years ago #

    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?

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    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 ...

  3. Axo1ot1
    Member
    Posted 3 years ago #

    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.

  4. number cruncher
    Member
    Posted 3 years ago #

    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.

  5. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    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

  6. Axo1ot1
    Member
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.