WEB Wordpress <div> issue

Discussion in 'OT Technology' started by illectronic, Aug 11, 2009.

  1. illectronic

    illectronic I'm Coming Home OT Supporter

    Joined:
    Jan 19, 2005
    Messages:
    16,950
    Likes Received:
    0
    Location:
    Brooklyn
    Hi all. I made this page in html using a mockup guide first. It's supposed to look like this: http://www.djneroso.com/test

    The wordpress url is: http://www.djneroso.com
    I checked the order of the div's and the css is right, but when wordpress generates <div id="page"> ends at the header when it should be extended throughout the whole page as the main container div. More importantly, <div id="sidebar"> appears within the blogcontent div, instead of floating to the right within the <div id="content"> container div. It looks really messed up even when viewing through page.php. Any help is appreciated, thanks.
     
  2. illectronic

    illectronic I'm Coming Home OT Supporter

    Joined:
    Jan 19, 2005
    Messages:
    16,950
    Likes Received:
    0
    Location:
    Brooklyn
    Made some more changes. Eliminated the <div id="page"> and now the <div id="content" is not even displaying when I look at it in firebug. "content" is supposed to contain .blogcontent which floats left and ".sidebar" and ".bottom_sidebar" which floats right.
     
  3. illectronic

    illectronic I'm Coming Home OT Supporter

    Joined:
    Jan 19, 2005
    Messages:
    16,950
    Likes Received:
    0
    Location:
    Brooklyn
    It's all fucked up now. I will upload a new version and check out your links.
     
  4. illectronic

    illectronic I'm Coming Home OT Supporter

    Joined:
    Jan 19, 2005
    Messages:
    16,950
    Likes Received:
    0
    Location:
    Brooklyn
    It's looking a lot better. Only thing fucked up now is the footer which I'm working on. What I did was take the default .php files and re-modify them from scratch.
     
  5. illectronic

    illectronic I'm Coming Home OT Supporter

    Joined:
    Jan 19, 2005
    Messages:
    16,950
    Likes Received:
    0
    Location:
    Brooklyn
    holy shit i got it! Now to re-add the graphics
     
  6. illectronic

    illectronic I'm Coming Home OT Supporter

    Joined:
    Jan 19, 2005
    Messages:
    16,950
    Likes Received:
    0
    Location:
    Brooklyn
    Ya definitely worth it to start from some type of base or from scratch. Thanks.
     
  7. pharmokan

    pharmokan OT Supporter

    Joined:
    Oct 18, 2002
    Messages:
    102,217
    Likes Received:
    463
    Location:
    L.A.
    what was the problem in the end

    were u missing a div tag
     
  8. illectronic

    illectronic I'm Coming Home OT Supporter

    Joined:
    Jan 19, 2005
    Messages:
    16,950
    Likes Received:
    0
    Location:
    Brooklyn
    No idea, i just started from scratch. I think the location of the div tag mattered. I put the closing tags in sidebar and footer.

    Now if I can get the rest of the generated shit to work...

    bottom_sidebar doesn't show up anywhere else except for index.php.
     
  9. illectronic

    illectronic I'm Coming Home OT Supporter

    Joined:
    Jan 19, 2005
    Messages:
    16,950
    Likes Received:
    0
    Location:
    Brooklyn
    Ok, I figured out everything except this.

    In sidebar.php i call 2 new divs called "search" and "bottom_sidebar".
    These display fine in index.php, but on any other page when I call the sidebar with get_sidebar, these 2 divs are left out.

    edit: The search box div is contained within the main sidebar div and it still won't load.

    http://www.neroso.com -index

    http://www.neroso.com/2009/07/27/dj-neroso-july-2009-tech-house-debut/ - Example of sidebar left out

    Any ideas?

    edit: front page was broken for a sec cause i was testing.
     
    Last edited: Aug 12, 2009
  10. illectronic

    illectronic I'm Coming Home OT Supporter

    Joined:
    Jan 19, 2005
    Messages:
    16,950
    Likes Received:
    0
    Location:
    Brooklyn
    My current sidebar.php:
    Code:
    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    ?>
        <div id="sidebar" role="complementary">
            <ul>
                <?php     /* Widgetized sidebar, if you have the plugin installed. */
                        if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
                
    
                <!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
                <li><h2>Author</h2>
                <p>A little something about you, the author. Nothing lengthy, just an overview.</p>
                </li>
                -->
    
                <?php if ( is_404() || is_category() || is_day() || is_month() ||
                            is_year() || is_search() || is_paged() ) {
                ?> <li>
    
                <?php /* If this is a 404 page */ if (is_404()) { ?>
                <?php /* If this is a category archive */ } elseif (is_category()) { ?>
                <p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>
    
                <?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
                <p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
                for the day <?php the_time('l, F jS, Y'); ?>.</p>
    
                <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
                <p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
                for <?php the_time('F, Y'); ?>.</p>
    
                <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
                <p>You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
                for the year <?php the_time('Y'); ?>.</p>
    
                <?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
                <p>You have searched the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
                for <strong>'<?php the_search_query(); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
    
                <?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
                <p>You are currently browsing the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives.</p>
    
                <?php } ?>
    
                </li>
            <?php }?>
            </ul>
            <ul role="navigation">
                <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>
    
                <li><h2>Archives</h2>
                    <ul>
                    <?php wp_get_archives('type=monthly'); ?>
                    </ul>
                </li>
    
                <?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?>
                
            <ul>
                <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
                    <?php wp_list_bookmarks(); ?>
    </ul>
    </ul>
                            
                                
                <div id="search">
                <?php get_search_form(); ?>
                </div>
                    
            
                    
                    </div>
                    <div class="bottom_sidebar" role="complementary">
                    <a href="http://feeds.feedburner.com/DjNeroso?format=xml"><img alt="Techno House podcast" border="0" src="http://www.neroso.com/wp-content/themes/nerosocustom/images/pngs/rssfeed_box_250x106.png" /></a>
                    </div>
                    <?php } ?>
    
                <?php endif; ?>
        
        </div> <!-- End of content -->
     
  11. illectronic

    illectronic I'm Coming Home OT Supporter

    Joined:
    Jan 19, 2005
    Messages:
    16,950
    Likes Received:
    0
    Location:
    Brooklyn
    I got it. For those that care I Put the div's within the ul class="navigation" in sidebar.php. Works on every page. a little more css to go and I'm golden.
     
  12. illectronic

    illectronic I'm Coming Home OT Supporter

    Joined:
    Jan 19, 2005
    Messages:
    16,950
    Likes Received:
    0
    Location:
    Brooklyn
    update: That didn't work either.
    Had to call another file containing the bottom portion using: <?php include ('sidebar2.php'); ?>

    Not sure why wordpress is gay like that. Had to fix it gypsy style.
     

Share This Page