Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #124165
    Sohrab G
    Participant

    Hi,

    I have checked the forum, I have seen a thread on how to add a sidebar with portfolio items listed (#91697). This one works but it displays the same thumbnails on all portfolio items. Is there anything I can add to the query filter to have is display specific categories?

    Or

    I was wondering if there is a way to add a normal sidebar to single portfolio items which is controlled from the WP Widgets area. So basically, having a normal widgetised sidebar on single portfolio.

    How would I go about doing that please?

    Cheers,

    S

    #124347
    Kosher K
    Member

    Hi There,

    To enable sidebar in Portfolio item,

    You need to make sure you use and activate a child theme,

    then copy both of these file to your child theme.

    x/framework/views/[your-stack]/wp-sidebar.php
    x/framework/views/[your-stack]/wp-single-x-portfolio.php

    edit x-child-[your-stack]/framework/views/[your-stack]/wp-sidebar.php (the one you copied to your child theme)

    At the very top, you’ll see this code <?php if ( x_get_content_layout() != 'full-width' ) : ?>

    change it to <?php if ( x_get_content_layout() != 'full-width' || is_singular( 'x-portfolio' ) ) : ?>

    Then edit x-child-[your-stack]/framework/views/[your-stack]/wp-single-x-portfolio.php
    That file would look something like this

    <?php get_header(); ?>
      
      <div class="x-container-fluid max width offset">
        <div class="x-row-fluid">
          <div class="x-main full" 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>
        </div>
      </div>
    
    <?php get_footer(); ?>

    Change this line <div class="x-main full" role="main"> to <div class="x-main left" role="main">

    Then add <?php get_sidebar(); ?> before the 2nd from last </div>

    New code should look like this

    <?php get_header(); ?>
      
      <div class="x-container-fluid max width main">
        <div class="offset cf">
          <div class="x-main left" role="main">
    
            <?php while ( have_posts() ) : the_post(); ?>
              <?php x_get_view( 'ethos', 'content', 'portfolio' ); ?>
              <?php x_get_view( 'global', '_comments-template' ); ?>
            <?php endwhile; ?>
    
          </div>
    	  <?php get_sidebar(); ?>
        </div>
      </div>
    
    <?php get_footer(); ?>

    I hope that helps,

    Have a great day

    #124495
    Sohrab G
    Participant

    Awesome @Support,

    Done the job – thank you.

    S

    #124648
    Darshana
    Moderator

    Glad we were able to help. Have a nice day 🙂

    #125647
    lukecd
    Participant

    Just wanted to chime in and thank you for this, helped me too.

    #125897
    Cousett
    Member

    Great we are so glad this could help you as well. Have a wonderful day.

    #205025
    Sohrab G
    Participant
    This reply has been marked as private.
    #205783
    Rad
    Moderator

    Hi there,

    You should edit your custom templates and replace all existence of x-container-fluid to x-container.

    Eg. from <div class="x-container-fluid max width offset cf">

    to <div class="x-container max width offset cf">

    Hope this helps.

    #222869
    pikestrike
    Participant
    This reply has been marked as private.
    #223116
    Christopher
    Moderator

    Hi there,

    #1 Please review this : theme.co/x/member/kb/unlimited-sidebars, You should assign specific sidebar to your page/post to avoid displaying ‘Main Sidebar’ in there.

    #2 Is that normal sidebar or custom sidebar? Please provide us with URL.

    Thanks.

    #223159
    pikestrike
    Participant
    This reply has been marked as private.
    #223217
    Christopher
    Moderator

    Hi there,

    Please add the following CSS under Customize -> Custom -> CSS :

    .x-portfolio .entry-info {
    width: 100%;
    }

    Hope it helps.

    #278740
    Sohrab G
    Participant

    Hi,

    I currently have the main sidebar in my single portfolio page (as suggested by ThemeCo support – post #124347), is there a way to have different sidebars for the single pages?

    For example, we have facts in three main categories, when viewing a single portfolio page for any of the categories, I would like the sidebar to only display portfolio items related to that category only – is there a way to do that?

    Many thanks,

    Sohrab

    #279071
    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    This could the one you’re looking 😉

    https://theme.co/x/member/forums/topic/portfolio-menu/page/2/#post-134727

    Cheers!

    #279328
    Sohrab G
    Participant

    Hi, the link you provided above seem to take me to posts with different issues – could you please check?

    Thanks,

    S

  • <script> jQuery(function($){ $("#no-reply-124165 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>