Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,851 through 6,875 (of 32,519 total)
  • Author
    Search Results
  • #172256
    dgalfano
    Participant

    Yes, I’ve searched and came across numerous similar problems about the sidebar not displaying on the forum pages. Yes, I read through the canned responses to review this page: https://codex.bbpress.org/themes/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/.

    We’re using the Bridge theme and I’ve made sure the forums page is using the page.php template, AND the <?php get_sidebar();?> IS in the code. So why is the forum index showing full-width and not showing my bbPress sidebar?

    Looking at source code of the rendered page does not show the sidebar though.

    http://tinyurl.com/hwak4zg

    thinkDrew
    Participant

    Thanks for the reply!

    This is actually something I did before posting here (should have mentioned it) and while running the default 2015 theme, I am running into the same issue. This is the URL /forums/search/french+fries/ that is returning in the browser instead of the normal /?s=french+fries peram.

    It’s strange as I have several other corporate wordpress sites running (not w/ bbpress) but have never had a problem with “out of the box” search widgets :)…

    I will continue to test (only running 4 plugins) and see what comes from that.

    #172248
    Robkk
    Moderator

    This is the CSS causing the issue. This is found in a custom css plugin or a custom stylesheet from your theme.

    #bbpress-forums fieldset.bbp-form p, 
    #bbpress-forums fieldset.bbp-form textarea, 
    #bbpress-forums fieldset.bbp-form select, 
    #bbpress-forums fieldset.bbp-form input, 
    #bbpress-forums fieldset.bbp-form .buddyboss-select {
        display: none;
    }
    #172244

    In reply to: bbp_new_forum hook

    fterra
    Participant

    Hi, antipole,
    I’m trying to do the same, subscribe all users to new forums and to new topics also.
    I’ve been working on it for a while, mainly figuring out how bbPress itself works.
    In the case you want to run something when someone creates a new forum from the admin page, my bet is you will want to hook to bbp_forum_attributes_metabox_save action, whose argument is $forum_id.
    Hope it helps.

    #172240
    Robkk
    Moderator

    See if this plugin fixes the issue you might be experiencing.

    https://github.com/OptimizePress/op-bbpress-fix

    The plugin seems to only contain a really small code snippet in it, so if you want to instead paste this code snippet instead you can also try that.

    Add this function to your child themes (if you have a child theme) functions.php file, or add the php code snippet into a plugin that can hold custom php code snippets like the functionality plugin.

    function op_allow_bbforum() {
        $forumPage = get_post(url_to_postid( "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] ));
        if ($forumPage->post_type == 'forum'){
            op_update_option('blog_enabled','Y');
            op_update_option('installed','Y');
        }
    }
    add_action('init', 'op_allow_bbforum');

    Make sure to test and see if this plugin/code snippet works for all of bbPress’ post types.

    _az_
    Participant

    I think #2258 is pretty complex to implement but possible. Might take some days to do it i guess.

    Here is my workaround:

    in functions.php:

    /**
     * for nicer permalinks:
     * 
     * from: forums/forum/name -> to forum/name
     * 
     * also required rewrite rules below in myThemeName_addRewriteRules
     */
    function myThemeName_bbp_get_forum_permalink_withoutRootSlug() {
    	return preg_replace( '/(' . bbp_get_root_slug() . '\/)/', '', bbp_get_forum_permalink()); 
    }
    
    function myThemeName_addRewriteRules() {
    	/**
    	 * add rewrite rules for bbpress
    	 */
    	
    	// use this to test instead of clicking Save Changes in Settings -> Permalinks
    	// global $wp_rewrite;
    	// $wp_rewrite->flush_rules();
    
    	add_rewrite_endpoint(get_option('_bbp_forum_slug'), EP_ROOT);
    	add_rewrite_rule('^'. get_option('_bbp_forum_slug') . '/(.*)?','index.php?post_type=forum&name=$matches[1]');
    }
    add_action('init', 'myThemeName_addRewriteRules');

    Replacement in my custom loop-single-forum.php:
    <a href="<?php echo myThemeName_bbp_get_forum_permalink_withoutRootSlug(); ?>">

    Default bbpress templates use it at more places than my theme:

    Found 5 matches of bbp_(get_)?forum_permalink in 4 files.	
    loop-search-forum.php	
    		<a href="<?php bbp_forum_permalink(); ?>" class="bbp-forum-permalink">#<?php bbp_forum_id(); ?></a>      [position 18:18]	
    		<h3><?php _e( 'Forum: ', 'bbpress' ); ?><a href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a></h3>      [position 26:58]	
    loop-search-topic.php	
    			<a href="<?php bbp_forum_permalink( bbp_get_topic_forum_id() ); ?>"><?php bbp_forum_title( bbp_get_topic_forum_id() ); ?></a>      [position 41:19]	
    loop-single-forum.php	
    		<a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a>      [position 32:42]	
    loop-single-topic.php	
    				<span class="bbp-topic-started-in"><?php printf( __( 'in: <a href="%1$s">%2$s</a>', 'bbpress' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span>      [position 68:102]	

    Feel free to hit the Flattr Button on my page: az.zankapfel.org

    Update: Seems that the breadcrumbs need a hack too… 🙂

    erlendglommen
    Participant

    Hi,

    How can I create a similar sidebar as is shown in the bbPress Support page (this page)? I really like the forum list (which I know I can create with the standard widget), but I can’t find how to create the extra #Posts column that displays the number of posts within each forum.

    And how do you add the pin icons in the “Views” sidebar?

    Within each forum there is also a really nice “Forum info” sidebar with #-of-topics, #-of-replies, last-post-by etc. Are these created with shortcode within a text-widget? And there are nice icons displayed here as well.

    It all looks really nice and clean and I would like to replicate it.

    All the best
    Erlend

    #172225

    In reply to: What do I do?

    Robin W
    Moderator

    all themes allow a child theme – it is a wordpress thing not a theme thing. They won’t ‘support’ as in give you free help to set up and run.

    see

    https://codex.bbpress.org/functions-files-and-child-themes-explained/

    As Pascal says, we can help with specific queries, but not in a full set-up. But googling around will fix a lot of what you’re asking.

    #172222

    In reply to: bbp-form style

    mulaps
    Participant

    http://codepen.io/anon/pen/XdrBJq?editors=0100#0
    The main.css

    #172204

    Topic: bbp-form style

    in forum Themes
    mulaps
    Participant

    Hi.
    Im using motoblog theme from wolfthemes. After installing bbPress forum plugin i had issue with content wrapper. In the custom css section added fief lines:

    #bbpress-forums {
        width: 92%;
        max-width: 1140px;
        margin: 0 auto 30px;    
    
    }

    But i still have the problem with bbp-forum section image: http://imgur.com/2cGasYv
    Can someone please help me with this problem? I zoomed out page to create image.

    #172201
    blux78
    Participant

    Hi everyone,

    I’m trying to accomplish the exact same thing hoborob was doing here above.

    Does anyone have a clear answer on this one, where to put what code in which file? Have searched the web extensively and found several solutions which come close, but not quite right yet.

    Thanks in advance for your time and help!

    Kind regards, blux78

    #172195
    Pascal Casier
    Moderator

    Hi,
    Just want to add that, for the people that do not want to code this, the functionality is also in the ‘bbP Toolkit’ plugin.
    Pascal.

    #172192

    In reply to: What do I do?

    Pascal Casier
    Moderator

    Hi John,
    We are all very much eager to help each other, but this forum runs on volunteers so we cannot just help you setting up your forum completely for you. You can however find people that do this for a living and pay them.

    Reading your above description I’m hesitating between ‘where is the question?’ and ‘There are 20 questions in 1 topic here’. So if you have any specific question, feel free to ask and if we can respond, we will.

    Trying to answer some parts and giving thoughts:
    – Not support child themes ? Then switch theme !
    – You can always put extra code in the functions.php of you theme, but after a theme upgrade make sure to check your updates are still there
    – For the login/redirect you are already on 2/3 other threads in this forum, please try to not repeat yourself in here

    So, for any specific question… shoot !

    Pascal.

    #172190
    Pascal Casier
    Moderator

    Hi,
    If you are on the /wp-admin/users.php page, you can select one or more users and then use the dropdown box on top that says ‘Change forum role to…’ and hit the ‘Change’ button next to it.

    If you edit a specific user on /wp-admin/user-edit.php?user_id=1234 you should find a ‘Forums’ section and a dropdown where you can set the forum role.

    Of course you can never change it on your OWN profile.

    Pascal.

    #172179
    Tenebral
    Participant

    Thank you @netweb .

    I just added the permalink, title and change the size from thumbnail to 80×80:

    add_action( 'widgets_init', 'rkk_widgets_init' );
    
    add_post_type_support('forum', array('thumbnail'));
    function ks_forum_icons() {
    	if ( 'forum' == get_post_type() ) {
    		global $post;
    	    if ( has_post_thumbnail($post->ID) )
    			echo '<a href="' . get_permalink( $_post->ID ) . '" title="' . get_the_title( $_post->ID ) . '">';
    	    	echo get_the_post_thumbnail($post->ID,array(80,80),array('class' => 'alignleft forum-icon'));
    			echo '</a>';
    	 }
    }
    add_action('bbp_theme_before_forum_title','ks_forum_icons');

    🙂

    #172176
    bimmerime
    Participant

    Where does that code goes exactly?!! also wouldn’t you want to nonindex the “users subscriptions”, “favorites”, and “topics started” as well ??

    siparker
    Participant

    yep. its a shame no one seems to be interested
    even with payment for the cause ? i suppose we need to try and find a freelancer who can submit to the core code after making a plugin perhaps?

    #172165
    chackem
    Participant

    I have looked at the function. I even found it in the source code (which of course is the same as above).

    I’m just curious why I’m not getting an array back, as the source code says:

    (array|bool) bbp_get_user_topics_started( $user_id = 0 );

    When I send it 1 for user_id, which I know has created 2 topics, (and those topics are shown on the bbpress profile page), I can only get an boolean back. Is there something I need to do to get an array of topics a user started other than this? Am I using the function wrong?

    Sorry. Still confused.

    Thanks.

    #172148
    Robkk
    Moderator

    @rono2 mostly focus on this guide below.

    https://codex.wordpress.org/Child_Themes

    #172146
    Pascal Casier
    Moderator
    #172142
    Pascal Casier
    Moderator
    #172131
    wselwood
    Participant

    Thanks Pascal – I’m assuming the best code is:

    function login_redirect( $redirect_to, $request, $user ){
    return home_url(‘forums’);
    }
    add_filter( ‘login_redirect’, ‘login_redirect’, 10, 3 );

    But to use registration (or register) instead of login?

    #172130
    Pascal Casier
    Moderator

    I’ve pasted code into functions.php files, almost anywhere I can

    There is only 1 (one) functions.php where you should paste it and that’s the one in your (child) theme.

    all the solutions offered take me nowhere

    I have put all the code that I have on https://bbpress.org/forums/topic/setup-login-for-private-forum/. If you only go for the code, then make sure to deactivate any other redirection and/or security plugins (at least for the test).

    the site is at tec.selwood.me

    You are missing the ‘Email’ label under the forgot your passsword on the log-in page

    Pascal.

    #172129
    wselwood
    Participant

    Ok, so I’m setting up my new bbPress forum and have come across a problem that I just can’t fix. It’s the redirection to the wp-login screen after registration. I’ve scoured these forums and all the solutions offered take me nowhere. I’ve installed 3rd party plugins (like Pete’s) but there is just no changing the redirect. I’ve pasted code into functions.php files, almost anywhere I can, but all it’s doing is going back to the damn wp-login page!

    I am going insane here trying to make this work.

    Latest WP version, latest Lincoln Education WP theme, latest bbPress version and the site is at tec.selwood.me

    #172125
    Ronald Mutsikwi
    Participant

    How can i display best rated forum post on my forum
    and recent replies post, any plugin or code to do this… thanks in advance for help

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