Trying to understand this... :S

7 replies
  • WEB DESIGN
  • |
Hey guys,

Take a look at this site: Madden Tips - Strategies, tips, hints and cheats for Madden 10

I'm using the navigation bar just below the header as a model for my site, but I can't understand what's going on.

Here's a video of my problem.. it's much easier to understand watching this video:


Thank you for your time,

Daniel
#cms #navigation #replicate #understand #wordpress
  • Profile picture of the author NeutroHost [Jon]
    Hey Daniel!

    Okay, I'm taking a blind guess here, not a lot of WP themes have this. But in your theme directory (wp-content/theme/themename/) do you see a home.php?

    If so edit it and remove <?php get_sidebar(); ?> or any variant of it.

    If you do not have home.php, then you could duplicate page.php and rename it as static.php, then remove <?php get_sidebar(); ?>

    And include this at the top of your static.php page:
    <?php
    /*
    Template Name: Static Home Page
    */
    ?>
    Head over to "Pages", edit "Home" and on the right sidebar (attributes tab), look out for "Template". Select "Static Home Page" from the dropdown menu and Save.

    Now make sure your settings has Static front page pointing to "Home".

    Basically your static.php file is now your new static front page. You will have to edit it and change the html / php codes to display what you want on the front page.

    If you do need any help, wordpress has a good support forum and codex (wiki site).

    Good luck!
    Signature
    NeutroHost || Carbon-Neutral Web Hosting as low as $1.95/month
    EXCLUSIVE 30% OFF all semi-annual and annual plans (Promotional Code: WARRIORFORUM).
    {{ DiscussionBoard.errors[1224001].message }}
    • Profile picture of the author Dantplayer
      Thanks for the guess. That actually did it.. somewhat.

      I guess now I know how to use templates within Wordpress to give certain pages certain features and others different ones.

      Now I just need to figure out how to get the sidebar here:

      Blog @ The Travian Blog

      back up at the top of the page. I'm thinking it has something to do with the limits defined in my "the loop", but I'm stilling trial and error'ing my way to the solution.
      Signature

      Join the Madness on Facebook!

      {{ DiscussionBoard.errors[1224639].message }}
  • Profile picture of the author NeutroHost [Jon]
    Glad that worked!

    I haven't looked into your codes in detail so I won't actually know what the problem is, but from what it looks like, it's a styling (.css) problem

    Basically, the area where your posts are showing is wider than it's supposed to be, pushing the sidebar all the way down. It's hard to say which exact <div> is causing this, but you can play around and reduce the size of each of the divs below and see what works:

    Code:
                <div id="wrap">
                    <div id="container">
    <div class="pagewrap">
        <div class="mainwrap">
        
            <div class="content">
    
                                                
                                        <div class="post" id="post-601">
                            <h2 class="posttitle">
    
                            <div class="entry">
    Hope that helps!
    Signature
    NeutroHost || Carbon-Neutral Web Hosting as low as $1.95/month
    EXCLUSIVE 30% OFF all semi-annual and annual plans (Promotional Code: WARRIORFORUM).
    {{ DiscussionBoard.errors[1225579].message }}
    • Profile picture of the author Dantplayer
      Hmm, not seeing it. From what I can see, taking one of the two </div> tags at the end of my code and inserting it in different places in the body of the code doesn't change anything but push the sidebar text a little to the right.

      It might be easier if you see the code, which is why I have it here... but I'm aiming to actually understand what's going on.

      PHP Code:
          <?php
          
      /*
          Template Name: Recent Blog Posts

          */
          
      ?>
      <?php get_header
      (); ?>

      <div class="pagewrap">
          <div class="mainwrap">
                  <div class="content">
                  <?php if (have_posts()) : ?>
                      <?php
                      
      global ;
                       = 
      get_posts('numberposts=1');
                       = 
      get_posts('numberposts=3&offset=1');
                       = 
      get_posts('numberposts=5&offset=4&order=DESC&orderby=post_date'); ?>
                      
                      <?php foreach( as ) :
                          
      setup_postdata();    ?>
                          <div class="post" id="post-<?php the_ID(); ?>">
                              <h2 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
                              <div class="entry">
                                  <?php the_content('<span>Read on &raquo;</span>'); ?>
                              </div>
                              <div class="postmeta">Posted in <?php the_category(', '?> | <?php edit_post_link('Edit'''' | '); ?>  <?php comments_popup_link('No Comments''Comment (1)''Comments (%)'); ?></div>
                          </div>
                      <?php endforeach; ?>

                      <?php foreach( as ) :
                          
      setup_postdata();    ?>
                          <div class="post" id="post-<?php the_ID(); ?>">
                              <h2 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
                              <div class="entry">
                                  <?php the_excerpt('<span>Read on &raquo;</span>'); ?>
                              </div>
                              <div class="postmeta">Posted in <?php the_category(', '?> | <?php edit_post_link('Edit'''' | '); ?>  <?php comments_popup_link('No Comments''Comment (1)''Comments (%)'); ?></div>
                          </div>
                      <?php endforeach; ?>

                      <?php foreach( as ) :
                          
      setup_postdata();    ?>
                          <strong><?php the_time('F jS, Y'?></strong><br />
                          <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
                          <br /><br /> 
                      <?php endforeach; ?>

                      <div class="navigation">
                          <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries'?></div>
                          <div class="alignright"><?php previous_posts_link('Next Entries &raquo;'?></div>
                      </div>
                  
                  <?php else : ?>
                      <h2 class="center">Not Found</h2>
                      <p class="center">Sorry, but you are looking for something that isn't here.</p>
                      <?php include (TEMPLATEPATH "/searchform.php"); ?>
                  <?php endif; ?>
              </div>

      </div></div>

      <?php get_sidebar(); ?>

      <?php get_footer(); ?>
      Signature

      Join the Madness on Facebook!

      {{ DiscussionBoard.errors[1227327].message }}
  • Profile picture of the author Dantplayer
    Just fixed it. Turns out the <div class="content"> tag needed to be replaced with <div id="content">.

    Of course I had to throw a </div> tag somewhere in there too. I have a bit of customizing left to go and I'm done. :-)

    Btw, how do you "thank" someone? I can never find the button.
    Signature

    Join the Madness on Facebook!

    {{ DiscussionBoard.errors[1227353].message }}
  • Profile picture of the author NowIstheTime
    Just use the Thanks button in black on the bottom right of the 'helpful' post.
    {{ DiscussionBoard.errors[1227406].message }}
    • Profile picture of the author Dantplayer
      Now see that's the strangest thing... there isn't one. Just the "quote" button in black; that's all.
      Signature

      Join the Madness on Facebook!

      {{ DiscussionBoard.errors[1227938].message }}

Trending Topics