Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,226 through 2,250 (of 32,461 total)
  • Author
    Search Results
  • Robin W
    Moderator

    your theme or elementor is doing this

    it has a css entry

    .has-sidebar:not(.error404) #primary {
    	float: left;
    	width: 58%;
    }

    you could change this to 100% in your custom css ie put this in your custom css

    .has-sidebar:not(.error404) #primary {
    	width: 100% !important;
    }

    but it might affect other parts of your site, so try it and see

    #215470
    Robin W
    Moderator
    #215469
    Robin W
    Moderator

    sorry, this one slipped by

    add this code, changing ‘shortcode here’ to the actual shortcode you wish to execeute

    add_action( 'bbp_theme_before_reply_form' , 'rew_add_shortcode'); 
    
    function rew_add_shortcode () {
    	echo do_shortcode( '[shortcode here]' );
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

    where %your-theme-name% is the name of your theme

    or use

    Code Snippets

    truth4vahid
    Participant

    How can I insert short codes under/above each topic page or whole topic and reply page?

    #215457

    In reply to: Customization

    wenlu
    Participant

    Can I fix the problem by changing its codes in the specific files ?
    If yes, due to I’m a new to WordPress, I don’t even know where should I edit the code.

    #215448

    In reply to: Customization

    Robin W
    Moderator

    this still works as far as I know

    How to Add WordPress Conditional Content to Sidebar Widgets

    so you would use

    !is_bbpress()

    against the my posts – so that will only show on non bbpress pages

    #215442
    samtime
    Participant

    Hi Robin, thank you for the code.
    I replaced my existing code with what you pasted here, unfortunately it didn’t fix the issue.
    Tried replacing the “WooCommerce” part with “woocommerce”, but still no luck.

    Thanks for the reply. If you have any other ideas, it would be greatly appreciated.
    I’ll keep searching.

    Thanks again,
    Sam

    Here’s the website btw:
    https://funkytime.tv/forums/

    cgauthey
    Participant

    Hello,
    I have a problem here my forum is small when I look at it on the index I would like to take the full width of the page.

    How to do what code I will be able to enter in the CSS

    See here https://perso-blog.fr/buisness-strategie/forums/

    #215425
    Robin W
    Moderator

    there are several plugins that do this eg

    CB Change Mail Sender

    or you can google for code

    #215413
    Robin W
    Moderator

    ok, a couple of thoughts just looking at that code

    The first would be to break it into a function, nested stuff can sometimes fail so

    add_action('init', 'rew_check_bbpress_moderator') ;
    
    function rew_check_bbpress_moderator(){
    	if(class_exists('WooCommerce') && function_exists('bbp_get_user_role') && is_user_logged_in()){
    		$current_user = wp_get_current_user();	
    		$user_id = $current_user->ID;	
    		$bbp_get_user_role = bbp_get_user_role($user_id);
    
    		if($bbp_get_user_role == 'bbp_keymaster' || $bbp_get_user_role == 'bbp_moderator'){	
    			add_filter( 'woocommerce_prevent_admin_access', '__return_false' );
    			add_filter( 'woocommerce_disable_admin_bar', '__return_false' );
    		}
    	}
    }

    Secondly I think woocommerce is all lower case so

    if(class_exists('WooCommerce')

    might need to read

    if(class_exists('woocommerce')

    Let us know if either of these help

    #215402
    samtime
    Participant

    Hi,
    After updating WooCommerce to the latest version (4.6.1), the plugin is now hiding the WordPress admin bar for bbPress moderators and keymasters. Making it harder for them to moderate the forums.

    The following code in my functions.php file used to resolve the issue, however it no longer works:

    add_action('init', function(){
    if(class_exists('WooCommerce') && function_exists('bbp_get_user_role') && is_user_logged_in()){
    
    $current_user = wp_get_current_user();	
    $user_id = $current_user->ID;	
    $bbp_get_user_role = bbp_get_user_role($user_id);
    
    if($bbp_get_user_role == 'bbp_keymaster' || $bbp_get_user_role == 'bbp_moderator'){	
    add_filter( 'woocommerce_prevent_admin_access', '__return_false' );
    add_filter( 'woocommerce_disable_admin_bar', '__return_false' );
    }
    }
    });

    I posted this question to the WooCommerce forums and am also posting it here in case anyone else is having similar problems?

    Any help or ideas greatly appreciated.
    Thank you,
    Sam

    WordPress 5.5.1
    bbPress 2.6.5
    WooCommerce 4.6.1

    #215351
    josh.grisdale
    Participant

    Hi,

    Looking for the same thing, but to show subscribed forums…

    Can your code be changed for that?

    #215344
    josh.grisdale
    Participant

    Hello,

    I want to create a widget for the sidebar of my site that shows the current user’s subscribed forums. (Like when you go to the user profile, you can see a list of subscribed forums, I want to have that list in a sidebar widget.)

    Is there a shortcode that could do this? Like:
    [bbp-forum-index id=$subscribed]

    #215260
    matgargano
    Participant

    I see that bbp_get_user_rewrite_id() exists, but there’s no filter in it. Is it possible to override that and have it use display name?

    matgargano
    Participant

    Hi, currently the user slug for my site is:

    https://domain.com/forums/users/first-last/ (it may not be exactly first-last, but it’s not what i ultimately want it to be).

    I want that to be: https://domain.com/forums/users/{display-name}/

    and it to change if the user changes their display name (301s aside, let’s not worry about old links to their profile that may exist)

    Is this possible out of the box? or via some method (code, plugin, etc)

    #215249
    Robin W
    Moderator

    try adding this to your theme’s custom css, or the custom css tab of style pack

    .mce-ico {
    	background: transparent center center !important;
    	color: #595959 !important;
    }

    you might need to play with the color to get what you want

    #215241
    albertoe
    Participant

    Thanks Robin, I check that a bbpress.php was created with this code:

    <?php
    get_header();
    
    ?>
    
    	<div class="td-main-content-wrap td-main-page-wrap td-container-wrap">
    		<div class="td-container">
    			<div class="td-pb-row">
                    <div class="td-pb-span8 td-main-content">
                        <div class="td-ss-main-content">
                            <?php
                                if (have_posts()) {
                                    while ( have_posts() ) : the_post();
                                        ?>
                                        <h1 class="entry-title td-page-title">
                                            <a href="<?php the_permalink()?>" rel="bookmark" title="<?php the_title_attribute() ?>"><?php the_title() ?></a>
                                        </h1>
                                        <?php
                                        the_content();
                                    endwhile; //end loop
                                }
                            ?>
                        </div>
                    </div>
                    <div class="td-pb-span4 td-main-sidebar">
                        <div class="td-ss-main-sidebar">
                            <?php dynamic_sidebar( 'td-default' ) ?>
                        </div>
                    </div>
    			</div> <!-- /.td-pb-row -->
    		</div> <!-- /.td-container -->
    	</div>
    <?php
    get_footer();
    ?>

    And I change with for this code:

    <?php
    get_header();
    
    ?>
    
    	<div class="td-main-content-wrap td-main-page-wrap td-container-wrap">
    		<div class="td-container">
    			<div class="td-pb-row">
                    <div class="td-pb-span8 td-main-content">
                        <div class="td-ss-main-content">
                            <?php
                                if (have_posts()) {
                                    while ( have_posts() ) : the_post();
                                        ?>
                                        <h1 class="entry-title td-page-title">
                                            <a href="<?php the_permalink()?>" rel="bookmark" title="<?php the_title_attribute() ?>"><?php the_title() ?></a>
                                        </h1>
                                        <?php
                                        the_content();
                                    endwhile; //end loop
                                }
                            ?>
                        </div>
                    </div>
    			</div> <!-- /.td-pb-row -->
    		</div> <!-- /.td-container -->
    	</div>
    <?php
    get_footer();
    ?>

    I refresh cache but nothing happends. Any idea?

    #215240
    Robin W
    Moderator
    #215221
    Robin W
    Moderator

    bbpress just uses wordpress signup, so whatever your WordPress site is using.

    There are several plugins that will let you change this email eg

    https://www.wpbeginner.com/plugins/how-to-send-a-custom-welcome-email-to-new-users-in-wordpress/

    or if you’re into coding, just google around to find some code

    #215197
    wjh
    Participant
    • WordPress 5.4.2
    • bbpress 2.6.5
    • Buddypress 6.3.0 w/ Activities module activated
    • bbp Style pack w/ both form editors (TinyMCE + text) activated
    • bbp Mentions suggest

    The bbp Mentions suggest plugin by the venerable @robin-w still works and enables autocomplete mentions in TinyMCE as well as in the Text (HTML) tab of the editor … but only on initial page load, since bbpress 2.6.2.

    Since bbpress 2.6.2, when clicking on Reply to a specific comment on a subject thread, the dynamic reply form now appears under the comment in question, and the window scrolls to it. Which is a very nice improvement! However, this breaks Robin’s plugin for the TinyMCE editor (mentions do still autocomplete in the Text editor, at least).

    I’m not a developer but I’m guessing it has to do with the new version of /bbpress/templates/default/js/reply.js, specifically the addEditor function at the end of the file.


    @robin-w
    any ideas how to get your plugin to play nice with the dynamic reply form in bbpress ≥2.6.2?

    Or anyone else out there?

    Cheers in advance!

    patriciaraelinn
    Participant

    Just need help with this… If I have to go into the CSS to make it work, please give me SPECIFIC instructions as I do’t code. Thank you.

    #215170

    In reply to: User Statistics

    xirife4479
    Participant

    first, i try this will not work but then i read again and put this code again its works fine thanks.

    #215163

    In reply to: Log In page

    Robin W
    Moderator

    sorry, one of the many annoying thing now that WordPress has blocks is that it doesn’t like shortcodes unless written in a special way – I’ll release a new version shortly, but yes you add it as a shortcode block in a page, and that is your forums page

    #215160

    In reply to: Log In page

    saigner
    Participant

    Hi @robin-w, just jumping on this thread as it is the same topic.

    I installed your bbpress style back a few days ago and it is up on my website. However, I can’t seem to figure out where to put the shortcodes to make them work. Do I need to put them in the files themselves or can I put them on in the page content? When I have tried to use the shortcode to force login on the forum index page for non-members (by putting it in the page content section), I get an error message that the “response received is not a valid JSON file.”

    Many thanks for all your hard work on this!

    #215155
    Robin W
    Moderator

    subscriptions used to be stored with the user, so in usermeta wp__bbp_forum_subscriptions which is what you are seeing – that data here is old.

    However on 2.6.x this has changed, and now subscriptions are stored in the postmeta of the forum or topic they are subscribed to.

    Each user has an entry

    so the query

    SELECT * FROMwp_postmetaWHEREpost_id= 2927 ANDmeta_keyLIKE '_bbp_subscription' ORDER BYmeta_idASC

    where 2927 is the ID of the forum

    will produce

    post_id	meta_key	meta_value
    2927 	_bbp_subscription 	1
    2927 	_bbp_subscription 	1191

    where the subsbribers to forum 2927 are user_id’s 1 and 1191

Viewing 25 results - 2,226 through 2,250 (of 32,461 total)
Skip to toolbar