-
AuthorPosts
-
October 13, 2014 at 7:22 am #124165
Sohrab GParticipantHi,
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
October 13, 2014 at 10:40 am #124347
Kosher KMemberHi 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.phpedit 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
October 13, 2014 at 2:23 pm #124495
Sohrab GParticipantAwesome @Support,
Done the job – thank you.
S
October 13, 2014 at 6:28 pm #124648
DarshanaModeratorGlad we were able to help. Have a nice day 🙂
October 15, 2014 at 8:16 am #125647
lukecdParticipantJust wanted to chime in and thank you for this, helped me too.
October 15, 2014 at 2:00 pm #125897
CousettMemberGreat we are so glad this could help you as well. Have a wonderful day.
February 12, 2015 at 9:54 am #205025
Sohrab GParticipantThis reply has been marked as private.February 13, 2015 at 4:46 am #205783
RadModeratorHi 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.
March 8, 2015 at 6:15 pm #222869
pikestrikeParticipantThis reply has been marked as private.March 9, 2015 at 1:37 am #223116
ChristopherModeratorHi 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.
March 9, 2015 at 2:43 am #223159
pikestrikeParticipantThis reply has been marked as private.March 9, 2015 at 4:16 am #223217
ChristopherModeratorHi there,
Please add the following CSS under Customize -> Custom -> CSS :
.x-portfolio .entry-info { width: 100%; }Hope it helps.
May 21, 2015 at 9:55 am #278740
Sohrab GParticipantHi,
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
May 21, 2015 at 7:43 pm #279071
RadModeratorHi 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!
May 22, 2015 at 4:07 am #279328
Sohrab GParticipantHi, the link you provided above seem to take me to posts with different issues – could you please check?
Thanks,
S
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-124165 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
