Skip to:
Content
Pages
Categories
Search
Top
Bottom

sidebar not automatically showing on new user Topics


  • stewmills
    Participant

    @stewmills

    I have:
    WP 4.4.2
    bbPress 2.5.8
    BuddyPress 2.4.3
    Karma theme 3.0.3

    I set-up the forum using method 2, which is a page called “userforum” containing the shortcode [bbp-forum-index] and the forum displays just fine and as well shows my left sidebar which houses my login and other widgets. I want this sidebar on ALL forum pages and by creating a bbpress.php page I think I resolved a previous issue where I couldn’t see my sidebar on all pages.

    However, I realized today that when a user creates a new Topic, the sidebar is not displayed. The only way I can make it display is to go into the topic as an WP Admin and select the desired sidebar on the Topic page settings and save changes.

    I need for new topics created by anyone to always include the sidebar. Did I miss a step somewhere or is this another aggravating quirk with bbPress or my theme not agreeing with one another

Viewing 14 replies - 1 through 14 (of 14 total)

  • Robin W
    Moderator

    @robin-w

    can you post a copy of your bbpress.php file in something like pastebin, so that we can see it


    stewmills
    Participant

    @stewmills

    Thanks for offering to look/help. I am using pastebin for the first time so bear with me if this doesn’t work correctly the first try:

    <iframe src=”//pastebin.com/embed_iframe/Hi6CWq99″ style=”border:none;width:100%”></iframe>


    stewmills
    Participant

    @stewmills

    I am afraid I am doing something wrong with pastebin. What about this:

    <?php
    /*
    Template Name: bbPress
    */
    ?>
    <?php get_header(); ?>
    </div><!– header-area –>
    </div><!– end rays –>
    </div><!– end header-holder –>
    </div><!– end header –>

    <?php truethemes_before_main_hook();// action hook, see truethemes_framework/global/hooks.php ?>

    <div id=”main”>
    <?php get_template_part(‘theme-template-part-tools’,’childtheme’); ?>

    <div class=”main-holder”>
    <?php
    //retrieve value for sub-nav checkbox
    global $post;
    $post_id = $post->ID;
    $meta_value = get_post_meta($post_id,’truethemes_page_checkbox’,true);

    if(empty($meta_value)){
    get_template_part(‘theme-template-part-subnav-horizontal’,’childtheme’);}else{
    // do nothing
    }
    ?>

    <div id=”content” class=”content_left_sidebar”>
    <?php if(have_posts()) : while(have_posts()) : the_post(); the_content(); truethemes_link_pages(); endwhile; endif;
    comments_template(‘/page-comments.php’, true);
    get_template_part(‘theme-template-part-inline-editing’,’childtheme’); ?>
    </div><!– end content –>

    <div id=”sidebar” class=”left_sidebar”>
    <?php generated_dynamic_sidebar(); ?>
    </div><!– end sidebar –>
    </div><!– end main-holder –>
    </div><!– main-area –>

    <?php get_footer(); ?>


    stewmills
    Participant

    @stewmills

    Just to throw this out as i am thinking out loud…Is it because I don’t have something set right in my child theme where this topic page is picking up a primary theme page instead of picking up the bbpress.php page. I read where bbpress “looks” for the list of pages and grabs the first one it sees in the list, but also understood that if I created this bbpress.php in my child theme that bbpress would know to bypass the other options and always use the bbpress.php template.

    Thanks!


    Robin W
    Moderator

    @robin-w

    so is the content showing full page, or is just the sidebar missing?


    stewmills
    Participant

    @stewmills

    Robin (thanks for always coming to my rescue),

    Everything on the page is good except the sidebar is missing. I can add it via dashboard if I edit the topic, but I cannot do this every time someone posts a new topic. All other pages have the sidebar.

    I tried to move my bbpress.php to the main theme directory to ensure that it was picking up this page before any other page and that changed nothing. I then thought maybe there was code in my page.php file from the initial load of bbpress that it might be looking for so I copied the page.php file from my theme and resaved it as bbpress.php and still no difference.

    I don’t really care that my forum is exactly like the layout of my other site pages so I am ok with some variation. My only requirements would be that (1) I can keep the header menu for navigation back to my main site and (2) I have the sidebar on any bbpress forum pages, specifically new topics in this situation.

    Forgive me for rambling, just trying to offer what I have tried and as well my flexibility.

    Would it be better for me to just make a new page template and tell it to pull in the sidebar on all pages versus using a template from the theme that included a sidebar?

    I am open to suggestions, but might need to be spoon fed a little to ensure I am following all of the appropriate steps.

    Many thanks!


    stewmills
    Participant

    @stewmills

    Oh…and about full page, I think the answer is NO. I get all of my other headers and footers, just missing the sidebar. The “blank space” where it goes is still there, it just does not display.


    Robin W
    Moderator

    @robin-w

    The “blank space” where it goes is still there, it just does not display.

    Great – that was the bit of information I was after.

    Ok, so the code above is from your page.php file saved as bbpress.php in your theme – yes?

    If so then try changing

    <?php generated_dynamic_sidebar(); ?>
    

    to

    <?php get_sidebar(); ?>
    

    This may not work, I’m just guessing at how your theme is designed !


    stewmills
    Participant

    @stewmills

    Ok, so the code above is from your page.php file saved as bbpress.php in your theme – yes?

    NO, and that may be the issue? What I did is copy one of my other theme pages that I know included a sidebar, let’s just call it “page-with-leftsidebar.php”. I copied this page into my child folder and renamed it bbPress.php and that’s the code I posted above.

    I can gladly try your suggestion above, but could it be that I used the wrong page to create my bbPress.php file? I did install the “What The File” plugin and when I look at what page my forum points to, including new topics, they all show bbpress.php as the main page with other things listed in the Template Parts section.

    Anyhow…let me try your suggestion above with that piece of code and report back before i have you on an wild goose chase for no reason.

    Thanks!!! Will report back shortly.


    stewmills
    Participant

    @stewmills

    Unfortunately that didn’t work. I switched the code and while it still included a sidebar with stuff, it was a sidebar with all sorts of crazy stuff about a page long.

    So, I acted as if I was starting over and I copied my page.php file and resaved it as bbpress.php in my main theme folder. The result of this was a page with no sidebar anywhere in my forum since this template does not include any sidebar info.

    So do I:
    a) keep the page.php file that I renamed to bbpress.php and just add some code (I would need directions) to include the sidebar on all bbpress pages.
    b) revert back to my previous page an keep troubleshooting this issue with the page template that i know works aside from the topics page.

    Here is the code from the page.php page that I renamed to bbpress.php, which looks great but does not display my sidebar on any forum page.

    <?php get_header(); ?>
    
    <?php 
    // check for WooCommerce. If true, load WooCommerce custom layout
    if (class_exists('woocommerce') && ((is_woocommerce() == "true") || (is_checkout() == "true") || (is_cart() == "true") || (is_account_page() == "true") )){ ?>
    
    </div><!-- header-area -->
    </div><!-- end rays -->
    </div><!-- end header-holder -->
    </div><!-- end header -->
    
    <?php truethemes_before_main_hook(); //action hook ?>
    
    <div id="main" class="tt-woocommerce">
    <?php get_template_part('theme-template-part-tools-woocommerce','childtheme'); ?>
    
    <div class="main-holder">
    <div id="content">
    <?php if(have_posts()) : while(have_posts()) : the_post(); the_content(); truethemes_link_pages(); endwhile; endif; 
    comments_template('/page-comments.php', true); ?>
    </div><!-- end content -->
    
    <div id="sidebar" class="right_sidebar">
    <?php 
    		if ( (is_cart() == "true") || (is_checkout() == "true") ) {
    			dynamic_sidebar("WooCommerce - Cart + Checkout");
    		} else {
    			dynamic_sidebar("WooCommerce Sidebar");
    		}
    		?>
    </div><!-- end sidebar -->
    </div><!-- end main-holder -->
    </div><!-- main-area -->
      
      
      <?php // ELSE load default layout
      } else { ?>
      
    </div><!-- header-area -->
    </div><!-- end rays -->
    </div><!-- end header-holder -->
    </div><!-- end header -->
    
    <?php truethemes_before_main_hook();// action hook, see truethemes_framework/global/hooks.php ?>
    
    <div id="main">
    
    <?php get_template_part('theme-template-part-tools','childtheme'); ?>
    
    <div class="main-holder">
    <div id="content" class="content_full_width">
    <?php if(have_posts()) : while(have_posts()) : the_post(); the_content(); truethemes_link_pages(); endwhile; endif; 
    comments_template('/page-comments.php', true);
    get_template_part('theme-template-part-inline-editing','childtheme'); ?>
    </div><!-- end content -->
    </div><!-- end main-holder -->
    </div><!-- main-area -->
      
      
      <?php // END WooCommerce loop
      } ?>
        
    <?php get_footer(); ?>

    Thanks!


    Robin W
    Moderator

    @robin-w

    ok that’s definitely a template for a full screen, the earlier one is for a page with sidebar.

    The problem is that your theme is doing stuff I have no idea about.

    Suggest you raise it with then theme author


    stewmills
    Participant

    @stewmills

    @robin-w,

    I feel like I am hitting a brick wall. I have tried to reach out to the theme author (Karma) and can’t get anywhere. Since our theme was purchased many years ago via persons that aren’t currently involved I don’t have the purchase info. I think in fact it was a development company that later turned it over to my company. Anyhow, in trying to get access to a Karma forum via Themeforest/envatomarket it tells me I can’t set up a technical support/request account because I am not a customer (I guess because my email address doesn’t match something). I know this is not a bbPress issue, but just a synopsis of where I am. I am stuck!

    My forum is pretty well buttoned up and ready to launch EXCEPT with this new topic issue. I apologize for asking this here but I can’t see a PM option on this site, but is it appropriate of me to ask if you can offer support for a fee if you think you can help me resolve this with a little coding?

    ? I am open for suggestions…I just hate to have gotten to this point and be hung on this issue right at the end.

    Thanks in advance!


    Robin W
    Moderator

    @robin-w

    contact me via my website
    http://www.rewweb.co.uk


    hs0815
    Participant

    @hs0815

    Hello.

    I have a problem with the bbpress sidebar. I use bbpress wp tweaks to create a widget area for bbpress. Thats ok.
    But: When i create a forum mainpage i dont have a chance to use this sidebar. I only have the choice to use sidebar left and right, but that would show the blogsidebar.
    What can i do to use the widget area for bbpress on sites. Link: https://myblender.de/blendtec-forum/

Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.
Skip to toolbar