Learndash, Sidebars Not Showing On Topics - Support - Themeco Home » How To Entable Sidebar In Learndash » Learndash, Sidebars Not Showing On Topics - Support - Themeco Maybe your like How Wide Are Balance Beams How To Evolve Basculin Legends Arceus How Wide Is Balance Beam How To Evolve Petilil Legends Arceus How Will I Know Lyrics Learndash, sidebars not showing on topics Support julezedward August 23, 2018, 6:49am #1 We tried with many different sidebar plugins, and we have been unsuccessful to have the deepest level of the Learndash system (topics, we call them lessons) to work with X and display sidebars. The X theme is blocking the display of it (and is not blocking it for the levels above (Courses and Lessons) Please advise. christian August 23, 2018, 9:56am #2 Hey @julezedward, We would need admin level access to check this issue. Currently, we have user level access. Thanks. julezedward August 24, 2018, 1:26am #3 Done, I have made you an administrator ruenel August 24, 2018, 3:12am #4 Hello There, It turns out that you added an invalid PHP code: add_filter('x_option_x_layout_content', 'add_sidebar_learndash',999); function add_sidebar_learndash($layout) { if ( 'product' || 'sfwd-courses' || 'sfwd-lessons' || 'sfwd-quiz' || 'sfwd-topic' || 'sfwd-certificates' == get_post_type() ) { $layout = "content-sidebar"; } return $layout; } The correct one should be: add_filter('x_option_x_layout_content', 'add_sidebar_learndash',999); function add_sidebar_learndash($layout) { if ( 'product' == get_post_type() || 'sfwd-courses' == get_post_type() || 'sfwd-lessons' == get_post_type() || 'sfwd-quiz' == get_post_type() || 'sfwd-topic' == get_post_type() || 'sfwd-certificates' == get_post_type() ) { $layout = "content-sidebar"; } return $layout; } Please have it updated and test your site again. julezedward August 24, 2018, 3:51am #5 Hi there done that, still no sidebar on the lesson level (topics) ruenel August 24, 2018, 4:18am #6 Hello There, I already updated the code and used this: add_filter('x_option_x_layout_content', 'add_sidebar_learndash',999); function add_sidebar_learndash($layout) { if ( 'product' == get_post_type() || 'sfwd-courses' == get_post_type() || 'sfwd-lessons' == get_post_type() || 'sfwd-quiz' == get_post_type() || 'sfwd-topic' == get_post_type() || 'sfwd-certificates' == get_post_type() ) { $layout = "content-sidebar"; } return $layout; } function assign_learndash_sidebar($sidebar){ if ( 'sfwd-courses' == get_post_type() || 'sfwd-lessons' == get_post_type() || 'sfwd-quiz' == get_post_type() || 'sfwd-topic' == get_post_type() || 'sfwd-certificates' == get_post_type() ) { return 'sidebar-main'; } return $sidebar; } add_filter( 'ups_sidebar', 'assign_learndash_sidebar'); // ============================================================================= The sidebar still not displaying as if there is an error encountered in the sidebar. It is evident in the page source code because the whole sidebar section is not being displayed. Could you please enable the debug mode? You can do this by opening wp-config.php and adding define('WP_DEBUG', true); /* That's all, stop editing! Happy blogging. */ When you revisit the page, we should have some error output describing the issue in more detail. And if no error is displayed, please provide us ftp so that we can investigate further. Thank you. julezedward August 24, 2018, 4:45am #7 RueNel: define(‘WP_DEBUG’, true); The debug log writes to here: http://devel.review/wp-content/debug.log I’ve just cleared it, and there are no new errors being created. the wp-config currently is setup like this define(‘WP_DEBUG’, true); define(‘WP_DEBUG_LOG’, true); define(‘WP_DEBUG_DISPLAY’, false); paul.r August 24, 2018, 8:58am #8 Hi, Sorry but we could not access the log file from the browser. Please provide us your FTP Login in Secure Note so we can check. Thanks julezedward August 24, 2018, 1:14pm #9 You really can. It now contains 3 lines. Please check again Alaa August 24, 2018, 3:13pm #10 Hi @julezedward I’ve checked the log and these three notices can’t be related to this issue, I’ve also noticed that you have single-topic.php file in your child theme directory, are you sure you got the same behavior with or without this file? We will need FTP login details in a Secure Note reply in order to investigate this issue in details. Thanks. julezedward August 25, 2018, 2:01am #11 here you go rad August 25, 2018, 12:38pm #12 Hi @julezedward, There is some kind of cache as the changes won’t take effect immediately even though your cache plugin is already inactive. Perhaps, it’s your host nature. And the issue with the sidebar and the topic is because the get_sidebar() is unable to call or load the sidebar.php which is weird since all post types in your site is using the same template which works. So instead, I went ahead and manually call the sidebar code through wp-single.php which is now under /wp-content/themes/impulsivity/framework/views/ethos/wp-single.php <?php // ============================================================================= // VIEWS/ETHOS/WP-SINGLE.PHP // ----------------------------------------------------------------------------- // Single post output for Ethos. // ============================================================================= $fullwidth = get_post_meta( get_the_ID(), '_x_post_layout', true ); 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; ?> <?php if ( 'sfwd-topic' == get_post_type() ) : ?> <aside class="<?php x_sidebar_class(); ?>" role="complementary"> <?php if ( get_option( 'ups_sidebars' ) != array() ) : ?> <?php dynamic_sidebar( apply_filters( 'ups_sidebar', 'sidebar-main' ) ); ?> <?php else : ?> <?php dynamic_sidebar( 'sidebar-main' ); ?> <?php endif; ?> </aside> <?php endif; ?> </div> </div> <?php get_footer(); ?> Thanks! julezedward August 27, 2018, 12:38am #13 Thanks. Now this page look really bad: http://devel.review/curriculum/ And actually all of it looks bad now. The sidebar is at the wrong side and contains widgets we don’t need… Please revert your changes paul.r August 27, 2018, 3:49am #14 Hi, I have removed the file that was added by my colleague. Thanks julezedward August 27, 2018, 7:22am #15 So is there going to be an actual solution provided? I have a website that works with a different premium theme, or with the stock WP themes, but not with X. The sidebar is still at the wrong side. Is it possible to have a refund if this doesn’t work? paul.r August 27, 2018, 8:54am #16 Hi, The sidebar is on the wrong side because the code is somehow changed. My colleague provided this The code you added shows sidebar-content Please change it back to content-sidebar Thanks julezedward August 28, 2018, 3:32am #17 I did not touch the code at all since this ticket was opened. Please provide a solution or refund. This is basic functionality that works with every other theme, except yours. Thank you christian August 28, 2018, 9:18am #18 Hey @julezedward, Upon checking, it looks like the correct sidebar is displaying in both your Single Lessons post and the Curriculum archive page (see secure note). Now, it worked because of @Rad’s suggestion and in combination with @RueNel code which has been updated by someone. Here’s the code given previously. RueNel: function assign_learndash_sidebar($sidebar){ if ( ‘sfwd-courses’ == get_post_type() || ‘sfwd-lessons’ == get_post_type() || ‘sfwd-quiz’ == get_post_type() || ‘sfwd-topic’ == get_post_type() || ‘sfwd-certificates’ == get_post_type() ) { return ‘sidebar-main’; } return $sidebar; } add_filter( ‘ups_sidebar’, ‘assign_learndash_sidebar’); When I checked, someone changed return 'sidebar-main'; to return 'ups-sidebar-learndash';. That someone could be one of my colleagues or someone on your side. Not necessarily you. Now, given that details, I checked Appearance > Sidebars (see Unlimited Sidebars feature of X) and you created a Learndash sidebar. And, that is what’s used if you use return 'ups-sidebar-learndash'; . The true reason why you needed those codes in the first place is you set the Global Content Layout to Fullwidth. That shuts off the sidebar for all single posts including custom post types. This is the reason why when you checked other themes, it works because they might not have a similar option. Just note that if you logout, you won’t see your Learndash sidebar because it needs a logged in user. For that, the https://developer.wordpress.org/reference/functions/is_user_logged_in/ WordPress conditional tag must be used like this: Thanks. julezedward August 29, 2018, 1:41am #19 Thanks @christian_y You really helped us on the right way. Please let us know how we can have a sidebar not show on individual blog posts while keeping them on the lessons? Thanks again. thai August 29, 2018, 7:24am #20 Hi There, To hide the sidebar on single posts, please add this custom CSS under Theme Options > CSS: .single-post .x-sidebar { display: none; } .single-post .x-main { width: 100%; } Please note that custom coding is outside the scope of our support. Issues that might arise from the use of custom code and further enhancements should be directed to a third party developer. Hope that helps and thank you for understanding. next page → Tag » How To Entable Sidebar In Learndash How To Create Custom Sidebars For Your Courses - LearnDash How To Create Content Aware Sidebars For Your LearnDash Courses Can I Create A Unique Sidebar For Courses, Lessons & Quizzes? How To Enable LearnDash Sidebar - WPGIZ How To Change The LearnDash Focus Mode Sidebar ... - YouTube How To Add Widgets To LearnDash Sidebars - YouTube How To Create Custom Sidebars In LearnDash Course ? - YouTube Sidebar / Container Options In Customizer For Learndash Not ... How To Display Sidebar In All Learndash Post Type Course Sidebar Widgets - Knowledge Base | BuddyBoss Resources Show Learndash Sidebars - Support - Themeco Forum Remove Sidebar On LearnDash Pages (UPDATED) Customize Sidebar For LearnDash - GeneratePress Using Elementor With LearnDash Part 2 - Wooninjas