Tagged: x
-
AuthorPosts
-
October 23, 2016 at 3:15 pm #1227514
catunderwoodParticipantHello,
I’d like a sidebar for my blog posts, but want to keep the rest of the site set to full width with no sidebars.
I followed the instruction in this thread https://community.theme.co/forums/topic/adding-a-sidebar-only-to-the-posts-page/ & created a wp-single.php file using the code at the top. This created space for sidebar, but I couldn’t see how to then add a widget to it?
I created a new sidebar within appearence>sidebars, set it manually to each post listed, then also a new widget, but nothing would show. I want to add sharing buttons, a photo/page link & newsletter sign up to a RH sidebar on blog posts.
URL is cohocontent.com. Thanks v much.
October 23, 2016 at 5:16 pm #1227580
NicoModeratorHi There,
Thanks for writing in.
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / passwordDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks.
October 25, 2016 at 2:03 pm #1230335
catunderwoodParticipantThis reply has been marked as private.October 25, 2016 at 2:04 pm #1230337
catunderwoodParticipantThis reply has been marked as private.October 25, 2016 at 4:40 pm #1230536
catunderwoodParticipantHi again,
I’m having a few other issues on my site so I’m wondering if they are all related?
Cornerstone isn’t working at all – I’ve tried a few things to delete it & also use a transient cleaner – but nothing. This has come up via a conversation with Jetpack support, as my share buttons have also stopped working.I can raise a separate ticket for the Cornerstone issue?
Thanks,
CatOctober 25, 2016 at 10:29 pm #1230864
Paul RModeratorHi Cat,
1. Kindly delete your wp-single.php file then add this in your child theme’s functions.php file
function x_get_content_layout() { $content_layout = x_get_option( 'x_layout_content' ); if ( $content_layout != 'full-width' ) { if ( is_home() ) { $opt = x_get_option( 'x_blog_layout' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( is_singular( 'post' ) ) { $meta = get_post_meta( get_the_ID(), '_x_post_layout', true ); $layout = ( $meta == 'on' ) ? 'full-width' : $content_layout; } elseif ( x_is_portfolio_item() ) { $layout = 'full-width'; } elseif ( x_is_portfolio() ) { $meta = get_post_meta( get_the_ID(), '_x_portfolio_layout', true ); $layout = ( $meta == 'sidebar' ) ? $content_layout : $meta; } elseif ( is_page_template( 'template-layout-content-sidebar.php' ) ) { $layout = 'content-sidebar'; } elseif ( is_page_template( 'template-layout-sidebar-content.php' ) ) { $layout = 'sidebar-content'; } elseif ( is_page_template( 'template-layout-full-width.php' ) ) { $layout = 'full-width'; } elseif ( is_archive() ) { if ( x_is_shop() || x_is_product_category() || x_is_product_tag() ) { $opt = x_get_option( 'x_woocommerce_shop_layout_content' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } else { $opt = x_get_option( 'x_archive_layout' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } } elseif ( x_is_product() ) { $layout = 'full-width'; } elseif ( x_is_bbpress() ) { $opt = x_get_option( 'x_bbpress_layout_content' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( x_is_buddypress() ) { $opt = x_get_option( 'x_buddypress_layout_content' ); $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt; } elseif ( is_404() ) { $layout = 'full-width'; } else { $layout = $content_layout; } } else { $layout = $content_layout; } if ( is_singular( 'post' ) ) { $layout = 'content-sidebar'; } return $layout; }2. May I know what is the issue with cornerstone?
I checked and it seems to be working fine.
http://screencast.com/t/gatuUvl7tge
Thanks
October 27, 2016 at 4:48 pm #1233847
catunderwoodParticipantHello,
Thanks very much for coming back to me. I’ve deleted the wp-single.php file from the main X Framework folder, and added the above code into the funcions.php for my child theme. However, the blogs have just disappeared. See attached – literally just a blank page!
For Cornerstone, I’ve also screen-grabbed the issue. the URL changes but none of the editing modules appear.
I’d be grateful for your help.
Thanks
CatOctober 27, 2016 at 4:56 pm #1233854
catunderwoodParticipantCornerstone attachment.
October 28, 2016 at 12:24 am #1234293
Paul RModeratorHi Cat,
Sorry for the confusion, you need to delete the wp-single.php file that is in your child theme and not on the main xtheme.
The file that needs to be deleted is located at wp-content/themes/x-child/framework/views/ethos
To fix the blank page, kindly create the file wp-single.php in wp-content/themes/x/framework/views/ethos
and copy the code into that file.<?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(); ?>Thanks
October 28, 2016 at 4:15 am #1234528
catunderwoodParticipantHello,
Ok, thanks. I had deleted it from the main X folder because the child folder is totally empty. So X-child>framework>views>ethos doesn’t have anything in it. See attached.
I’ve added the single PHP file back into the X folder & there’s now a sidebar on my posts, thanks v much.
How do I edit the sidebar? E.g. I need to add a margin to the top as my logo overlaps the content (a recurring issue in fact on my site), & if I want to add in recent posts, change social icon style etc, is this just edited like a normal sidebar?
Re. cornerstone, I still can’t edit with it. Shall I open a separate ticket?
Thanks,
CatOctober 28, 2016 at 4:44 am #1234575
Paul RModeratorHi Cat,
1. To add margin to your sidebar, you can add this in Custom > Edit Global CSS in the customizer.
.single-post .x-sidebar.right { margin-top:50px; }You may change 50px to adjust spacing.
2. To add contents to your sidebar, navigate to Appearance > widgets and you can drag or edit widgets to your Blog Sidebar.
See screenshot- http://screencast.com/t/lkGRrxNBTxnW
Hope that helps.
October 28, 2016 at 4:49 am #1234577
catunderwoodParticipantSuper, thanks a million for your help.
I will raise a new ticket for Cornerstone.
Cat
October 28, 2016 at 5:51 am #1234649
LelyModeratorYou’re welcome Cat!
Cheers!
January 16, 2017 at 11:13 am #1332251
catunderwoodParticipantHello,
You helped with adding in some sidebar content for blog posts, but a blog added today doesn’t have it.Old blog with correct sidebar:
http://cohocontent.com/?p=601New blog which doesn’t have all the info:
http://cohocontent.com/?p=827Can you help at all with making the sidebar template in the first link standard across blogs?
Incidentally, I would rather use post/page titles as the URL/permalink but still can’t as it breaks Cornerstone. If you think you might be able to help now with that let me know & I’ll open a new thread for that issue.
Thanks in advance,
CatJanuary 16, 2017 at 2:06 pm #1332500
JadeModeratorHi Cat,
I’d like to check further but the login details provided before doesn’t seem to work anymore.
Would you mind providing them again so that we could check it for you?
Thank you.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1227514 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
