Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,776 through 6,800 (of 32,519 total)
  • Author
    Search Results
  • #172643
    uschesch
    Participant

    Pascal, I found the code to add to enqueue my child style sheet.

    wp_enqueue_style( ‘child-style’, get_stylesheet_uri(), array( ‘parent-style’ ) );

    I added it, and all works well.

    Thank you so very much!

    karlbenn73
    Participant

    Hi All

    I’m still new to BBPress and to WordPress if I’m to be honest…

    I am using the Woo Storefront Theme.

    I have created a new page on my website and called it “forum” and then used the
    [bbp-forum-index] shortcode on that page.

    1. I have installed a plugin that allows me to turn off my page title but for some reason BBPress seems to be overriding this feature which is working fine on all my other pages? How do I turn my page title off within BBPress?

    2. I have also set up a few forums, one of them called “School Community Discussion”
    Inside this “parent” forum I have created two child forums called “Michael Mount Waldorf School” and “Moore House Academy”

    When I click on one of the child forums to post a new topic, there is no “new post” window for me to add a new post. This window is only available at the parent forum level!? How do I resolve this?

    3. I must say that I’m dumbfounded that BBPress doesn’t have a “Post new Topic” button that will allow you to click and then select whichever forum you want to post into from a dropdown menu. I there any way to create a button like this?

    Thx
    Kb

    #172636
    shadynicnack
    Participant

    So where do you place the code? Do we make a new file and include it in the wp_config? Do we do each query/set per page or in a function? Is it possible to use an external database connecting to your login?

    #172635
    awal16
    Participant

    I followed the steps, but the right sidebar doesn’t show up, the main-sidebar is still vissible.

    My code in the functions.php:

    
    function rkk_widgets_init(){
    	register_sidebar(array(
    		'id' => 'bbp-sidebar',
    		'name' => __( 'Forum sidebar', 'rkk' ),
    		'description' => __( 'Sidebar voor het forum', 'rkk' ),
    		'before_widget' => '<div id="%1$s" class="forum-widget %2$s">',
    		'after_widget' => '</div>',
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>'
    	));
    }
    add_action('widgets_init', 'rkk_widgets_init');
    

    The code in the sidebar.php:

    
    <?php if (is_active_sidebar('main-sidebar') && !is_bbpress()) : ?>
    	<div id="secondary" class="widget-area" role="complementary">
    		<?php dynamic_sidebar('main-sidebar'); ?>
    	</div><!-- .widget-area -->
    	
    <?php elseif (is_active_sidebar('bbp-sidebar') && is_bbpress()) : ?>
    
    	<div id="secondary" class="widget-area" role="complementary">
    		<?php dynamic_sidebar('bbp-sidebar'); ?>
    	</div><!-- .widget-area -->
    <?php endif; ?>
    

    In the backend, the forum widget does appear, and I can add Widgets to it. Only on the front-end, on forum pages, he doesn’t show the right sidebar.

    #172632
    Pascal Casier
    Moderator

    Hi,
    Start from this article: https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#26-creating-a-bbpress-specific-sidebar
    Come back if you need anything else.
    Pascal.

    #172621
    Robin W
    Moderator

    not really a bbpress question, but this should help – in effect you do each query/set with the connection details.

    $user="xxx";
    $password="yyy";
    $database="zzz";
    $host="aaa";
    $con=mysqli_connect($host,$user,$password,$database);
    $query="select user_email from wp_users where ID=".$id ; 
    $result = mysqli_query($con,$query) or die("failed to get result1"); 
    

    or

    to update

    $update= "UPDATE wp_posts SET post_content =\"".$post2."\" WHERE ID=".$id2 ;
    mysqli_query($con,$update)  ;	
    	
    #172619
    Robin W
    Moderator

    ok I wouldn’t worry about the structure, just create the forums and use multiple shortcodes to build your page

    eg

    [bbp-single-forum id=3] 
    [bbp-single-forum id=6] 
    [bbp-single-forum id=8] 
    
    

    That way you control the flow

    I’d then switch off breadcrumbs and use the sidebar as navigation.

    #172618
    shadynicnack
    Participant

    I’m a bit new and trying to get back into wordpress again. I have a wordpress website that needs to use the wordpress database that we first set up, and 2 external databases to obtain information and even at times to edit, and update information. Tried using external database but that is for one external database coming in. Want to use an external database to first set up login meaning when they enter username and password, it will find it through g h the external database. So my question is… What is the best way this situation? If it is coding, is there some tutorials that I can do this?

    Did some research, and someone said that I can use this code in the functions.php to help access another database… Is it functions pho in main or themes?

    $newdb = new wpdb($DB_USER, $DB_PASSWORD, $DB_NAME, $DB_HOST);
    $newdb->show_errors();

    So I add this in the functions, but where do I put the second database’s info like host, username, password and etc? Where do I put the query code at?

    Will this work to connect to an external databases?

    Please Help!!!!

    #172607

    In reply to: forum page

    bodybyloud
    Participant

    I’m having the same issue. I’m using divi theme and bbpress shortcode for forum index. http://bodybyloud.com/Bodybyloud%20LoudTalk%20Forums/forum/introduction/ the post page comes up when you click on the Introduction forum I created.
    wordpress- 4.4.2
    bbppress – 2.5.8

    Robkk
    Moderator

    @swstarone this could be bbPress theme compatibility/WordPress theme related issue, an seo plugin could possibly cause this, title tag updates in WordPress could cause this too.

    you can notice that there no username or nickname displaying on the page.

    This could be a bbPress theme compatibility issue/theme issue. The title could be outputted if the page is_single(), but the user profile pages do not do this.

    https://bbpress.trac.wordpress.org/ticket/2545

    This php code snippet could help with the issue though.

    function rkk_add_title_to_user() {
        ?>
            <h1 class="entry-title"><?php bbp_displayed_user_field( 'display_name' ); ?></h1>
        <?php
     }
     add_action( 'bbp_template_before_user_details', 'rkk_add_title_to_user' );
    #172590
    Robkk
    Moderator

    Sorry for the late reply.

    If it is pending the only thing in bbPress’ code that can add posts into pending is when a post contains a word in the comment moderation input box in Settings > Discussion and like I said before some plugins could add their own blacklist and hook into this, so make sure you have some spam plugins while you are testing this.

    In the past there was a user that had to approve posts manually because a plugin at the root of the users server called “mojo marketplace” has a hidden blacklist inside of it that affected the posts.

    You may also want to remove the “http” and “wwww” in your blacklist as this may be affecting it too.

    #172589
    mojomo
    Participant

    I’m using a child theme and I’m trying to make CSS adjustments to the forum list. I need to get rid of float + width because the numbers are not aligned with the titles (topic, voices, replies, last post). Whatever I try, bbpress ignores my changes. I tried adding the new CSS to style.css in my child theme as well as adding it to Jetpack’s custom CSS. I did even add the extra code to functions.php in my child theme so that bbpress style could be overwritten without using !important. Using !important doesn’t work either. I really don’t know what else to try. My theme is not perfect for bbpress, so I need to tweak a few things.

    #172587

    In reply to: Editing “Reply To”

    Robkk
    Moderator

    Copy the default bbPress templates to a folder called bbpress in a child theme then you can edit the templates how you would like.

    The files you are looking for is form-anonymous.php and form-reply.php.

    Here is a guide that will explain this a little more.

    https://codex.bbpress.org/themes/theme-compatibility/

    #172586
    uschesch
    Participant

    Oh, I apologize. I reread Pascal’s suggestion and realized that I did not do one step, which I am assuming is very important. I did not enqueue my style sheet after the code. Unfortunately, I don’t know how to do that.

    oyegigi
    Participant

    Hey y’all. I’m trying to import a bbpress forum from one site to another and am experiencing troubles getting my replies to show up. I’ve imported .xml files for my forum, topics, and replies (I had to separate out my replies into batches bc it was so large). In my admin section it shows that there are 442 published replies however none show up on the table. I’ve tried “Recalculate the position of each reply” in Repair Forums but get a blank screen every time.

    I tried increasing my execution time in .htacess by adding php_value max_execution_time 900 and still nothing.

    Any suggestions on how I can get this replies to show up? Thanks!

    #172573
    Robkk
    Moderator

    Use this custom CSS and add it to your child themes style.css file or in a custom css plugin.

    .the_champ_outer_login_container {
        float: left;
    }
    
    div.bbp-submit-wrapper {
        float: none;
    }
    #172557
    Pascal Casier
    Moderator

    Hi,
    Not sure if 100% related, but if you know a little bit of coding, you can also check this : https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#6-load%c2%a0the-style-sheet-after-bbpress
    Pascal.

    #172533
    Robin W
    Moderator

    ok, so as I understand it

    fro each topic/reply, you want the widget to search for then first video/picture within that topic or reply, and show that as a thumbnail – is that correct?

    If so I know of nothing that would do that, and it would be quite a lot of code to create it.

    #172532
    Lars Henriksen
    Participant

    Hello,

    I have found a code snippet somewhere, that does a fine job by including forum topics in the ordinary WP search. The only problem is that I have now added some private forums on the site where teachers can share assignments and problem statements for use in class.

    So I would like to exclude private forum topics and replies from search results unless you are logged in as ‘contributor’ and up.

    Does anybody know how to code that?

    My code snippet is here:

    /**
     * Include bbPress 'topic' custom post type in WordPress' search results */
     
    function ntwb_bbp_topic_cpt_search( $topic_search ) {
    	$topic_search['exclude_from_search'] = false;
    	return $topic_search;
    }
    add_filter( 'bbp_register_topic_post_type', 'ntwb_bbp_topic_cpt_search' );
    
    /**
     * Include bbPress 'forum' custom post type in WordPress' search results */
    
    function ntwb_bbp_forum_cpt_search( $forum_search ) {
    	$forum_search['exclude_from_search'] = false;
    	return $forum_search;
    }
    add_filter( 'bbp_register_forum_post_type', 'ntwb_bbp_forum_cpt_search' );
    
    /**
     * Include bbPress 'reply' custom post type in WordPress' search results  */
    
    function ntwb_bbp_reply_cpt_search( $reply_search ) {
    	$reply_search['exclude_from_search'] = false;
    	return $reply_search;
    }
    add_filter( 'bbp_register_reply_post_type', 'ntwb_bbp_reply_cpt_search' );
    
    

    Thanks.

    Current WordPress and bbPress

    Historielaerer.dk (a site for history teachers)

    #172525
    pwonlineblog
    Participant

    I installed WordPress as an add-on to my webpage with Aabaco Small Business (formerly Yahoo), so I don’t have folders downloaded on my computer to access code. I want to make a couple of changes to the “Reply To” form in my forums. One box asks for “Mail” and I’d like to change that to “Email” to make it more understandable. I’d also like to eliminate the box for “Website” if possible since it wont be applicable to the people who will be responding on my forum.

    I’m not all that experienced with coding, but I have done a little of it on my website and I’m good at following directions! Is it possible to make these changes since I don’t have WordPress as a stand alone?

    #172524
    Robkk
    Moderator

    @nicolasmahy

    Yeah the responsive styles in bbPress use .bbp-body which is having the issue here. But since you customized and removed the labels in the header of the forums you can try this custom CSS and see if it helps any.

    @media screen and (max-device-width: 480px) {
    #bbpress-forums div.bbp-forum-content, 
    #bbpress-forums div.bbp-topic-content, 
    #bbpress-forums div.bbp-reply-content {
        margin-left: 0px;
        padding: 12px;
    }
    
    #bbpress-forums div.bbp-forum-author,
    #bbpress-forums div.bbp-topic-author,
    #bbpress-forums div.bbp-reply-author {
        float: none;
        text-align: center;
        width: 100%;
    }
    
    #bbpress-forums div.bbp-forum-author a.bbp-author-name, 
    #bbpress-forums div.bbp-topic-author a.bbp-author-name, 
    #bbpress-forums div.bbp-reply-author a.bbp-author-name {
        margin: 0;
        word-break: break-word;
        display: block;
    }
    }
    #172519
    Pascal Casier
    Moderator

    Hi,
    What bbPress forum did you create ? So if you edit your forum /wp-admin/edit.php?post_type=forum is the ‘visibility’ under ‘Forum Attributes’ set correctly ? Try to switch it if needed with an ‘update’ in between.
    Pascal.

    #172518
    Pascal Casier
    Moderator

    Hi, I’m sorry but I have no idea what you try to do, but as you talk about forums and subforums without forums, you might mean that you want an extra level ?
    Maybe you look for Categories > Forums > Subforums ?
    Then look at https://codex.bbpress.org/getting-started/configuring-bbpress/creating-content/#creating-a%c2%a0forum

    If not, just come back and explain again.

    Pascal.

    #172516
    angeljs
    Participant

    I’m running a WordPress Multisite install and have bbPress setup on the main site. However, logged-in users can’t access the main forum. Admins and guests can see them, which doesn’t seem to make sense. Users can see group forums, but not the main page, they just get a page not found error. I’ve even tried creating the forums page and adding the shortcodes, but still get the same error.

    New users are supposed to have the participant roll, which I’ve checked. I’ve also tried repairing the forums, but nothing works.

    #172512
    Brovashift
    Participant

    Hi anyone and everyone,

    Im just wondering why bbpress displays participants real name instead of their username by default? I want to change this as I can’t remember ever seeing a site before where you create a username for it not to be used, even this bbpress support forum shows usernames!

    I see topics on this matter going back 4+ years, and still its the same solution, why?

    So why is it that we have to edit code to achieve this? It should at least be a simple edit in the admin area.

Viewing 25 results - 6,776 through 6,800 (of 32,519 total)
Skip to toolbar