• Resolved smartyd

    (@smartyd)


    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: https://hometheatertips.co/organize-equipment-rack/ but this is how it comes out (title is flipped to the bottom): https://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="https://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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter smartyd

    (@smartyd)

    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.

    Thread Starter smartyd

    (@smartyd)

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

    Thread Starter smartyd

    (@smartyd)

    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Post Template styling issue’ is closed to new replies.