WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom Post Template styling issue (4 posts)

  1. smartyd
    Member
    Posted 1 year ago #

    I've created a post template and the output is almost perfect, but there is a styling issue I can't figure out. The post should look like: http://hometheatertips.co/organize-equipment-rack/ but this is how it comes out (title is flipped to the bottom): http://hometheatertips.co/speaker-repair/
    The code in the custom template reads:

    if (have_posts()) {
       while (have_posts()) {
          the_post();
                    global $suf_prev_next_above_below;
          if ($suf_prev_next_above_below == 'above' || $suf_prev_next_above_below == 'above-below') {
             get_template_part('custom/prev-next');
          }
          $original_post = $post;
          do_action('suffusion_before_post', $post->ID, 'blog', 1);
    
    ?>
    
       <article <?php post_class();?> id="post-<?php the_ID(); ?>">
    
          <div class="entry-container fix">
             <div class="entry fix">
    
    <div class="videoplayer"><?php echo get_post_meta($post->ID, 'video_code', true); ?></div>
    <div class="affiliate"><?php echo get_post_meta($post->ID, 'affiliate120x300', true); ?></div>
    <a class="thumbnail" href="#thumb"><img src="http://hometheatertips.co/wp-content/uploads/2013/02/info2.png" width="29px" height="29px" border="0" /><span><?php echo get_post_meta($post->ID, 'description', true); ?></span>
    
    <?php
          suffusion_after_begin_post();
       ?>
    
    <?php
          suffusion_content();
    ?>
              </div><!--/entry -->
               </div><!-- .entry-container -->
    
        </article><!--/post -->

    Do I need to add anything anywhere? What am I doing wrong?
    Thanks for any help.

  2. smartyd
    Member
    Posted 1 year ago #

    Resolved. The problem was that all my content came from custom fields and not from the post. So there's no "content" in the center of the blog to hold the sidebars apart, hence they jump to the center of the blog.
    My solution was to enable the tags below the post, and that "spanned" the main content area of the blog, pushing the sidebars to the side.
    Clear as mud I'm sure, but I thought I'd give you the rest of the story.

  3. smartyd
    Member
    Posted 1 year ago #

    P.S. I also deleted the suffusion_before_begin_post() and the suffusion_content() at the end of the code above.

  4. smartyd
    Member
    Posted 1 year ago #

    Oops. Right answer for wrong question. The resolution to the first problem above was to move the suffusion_before_begin_post() above the custom fields. A new problem arose by doing that: the sidebars collapsed to the center of the blog.
    The solution to that is what I wrote above.
    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic