• Resolved bmwest

    (@bmwest)


    Hi there.

    I have tried to make the sidebar appear on my single listing template but cannot for the life of me figure it out.

    I have the single.php in the x theme ethos stack to compare:

    <?php
    
    // ======================================================
    // VIEWS/ETHOS/WP-SINGLE.PHP
    // ------------------------------------------------------
    // Single post output for Ethos.
    // ======================================================
    
    $fullwidth = get_post_meta( get_the_ID(), '_x_post_layout', true );
    
    ?>
    
    <?php get_header(); ?>
    
      <div class="x-container max width main">
        <div class="offset cf">
          <div class="<?php x_main_content_class(); ?>" role="main">
    
            <?php while ( have_posts() ) : the_post(); ?>
              <?php x_get_view( 'ethos', 'content', get_post_format() ); ?>
              <?php x_get_view( 'global', '_comments-template' ); ?>
            <?php endwhile; ?>
    
          </div>
    
          <?php if ( $fullwidth != 'on' ) : ?>
            <?php get_sidebar(); ?>
          <?php endif; ?>
    
        </div>
      </div>
    
    <?php get_footer(); ?>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]

    what should i be changing in the single-listing.php template to get the sidebar to show up?

    https://wordpress.org/plugins/wp-listings/

Viewing 1 replies (of 1 total)
  • Plugin Author agentevolution

    (@agentevolution)

    The single-listing.php template includes the required call to get_sidebar()

    You may want to just copy this single.php file to your theme and rename it single-listing.php.

    Then replace this line:
    <?php x_get_view( 'ethos', 'content', get_post_format() ); ?>

    With this:
    <?php single_listing_post_content(); ?>

Viewing 1 replies (of 1 total)

The topic ‘Single Listings Template in X Theme – Side Bar not showing up’ is closed to new replies.