Adding or finding sidebars

Hi Folks,

I am trying again to add sidebars, I upgraded to Pro, and in “X” I was offered by you some PHP code to create within Child theme for the Renew Portfolio ---- will this code still work for X —> Pro?
(please review the topic “Grey rectangles on my portfolio pages”)

Can I not change from Renew to the ICON theme and have sidebars?

Will any of these themes support portfolio sidebars out of the box?

Thanks so much for some direction. = John

Hello John,

Thanks for writing in!

Most of the time, the code given is specific to the stack that you are using. You may try to change renew to icon so that it will work in icon stack. Much better if you gave the complete code in your next reply just to make sure that we are on the same page.

Can I not change from Renew to the ICON theme and have sidebars?

  • The stacks were built unique from each other. All of the portfolio page has not sidebar in it though the have different layouts.

Will any of these themes support portfolio sidebars out of the box?

  • No stacks supports sidebars in displaying the portfolio items. You may need a little customization to allow the sidebars in the portfolio items.

If ever you want to have a sidebar for the portfolio items with Renew stack, assuming that you have your child theme active and ready, please follow these steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// VIEWS/RENEW/WP-SINGLE-X-PORTFOLIO.PHP
// -----------------------------------------------------------------------------
// Single portfolio post output for Renew.
// =============================================================================

$fullwidth = get_post_meta( get_the_ID(), '_x_post_layout', true );
get_header();

?>

  <div class="x-container max width offset">
    <div class="<?php x_main_content_class(); ?>" role="main">

      <?php while ( have_posts() ) : the_post(); ?>
        <?php x_get_view( 'renew', 'content', 'portfolio' ); ?>
        <?php x_get_view( 'global', '_comments-template' ); ?>
      <?php endwhile; ?>

    </div>

    <?php if ( $fullwidth != 'on' ) : ?>
      <?php get_sidebar(); ?>
    <?php endif; ?>
    
  </div>

<?php get_footer(); ?>

3] Save the file named as wp-single-x-portfolio.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/x-child/framework/views/renew/

Of course you will have to create folder path since it does not exist yet in your child theme.

Hope this helps. Please let us know how it goes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.