Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 8,501 through 8,525 (of 32,505 total)
  • Author
    Search Results
  • #163350
    Robkk
    Moderator

    Enable Visual Editor

    TinyMCE Advanced allows you to include alignment buttons.

    You might need this code, because bbPress does not support all html for participant users that TinyMCE Advanced may use for its buttons.

    https://gist.github.com/robkk/788f75d47466c74e5340

    Robkk
    Moderator

    trying to get the feature image funtionality on front end so user can have the option to upload image about the Topic

    This sounds like custom development , you might need a developer to do this type of thing.

    get the feature image on Widget “Forum list” Default widget of BbPress plugin

    You would need to create a new “Forums list” widget mostly based off the original bbPress default widget.

    Then use get_the_post_thumbnail to render your featured images

    https://codex.wordpress.org/Function_Reference/get_the_post_thumbnail
    https://codex.wordpress.org/Post_Thumbnails

    #163342
    Robkk
    Moderator

    This is a common issue. Your theme is just rendering bbPress as a blog post

    You need to create a bbpress.php for your site to fix this.

    https://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    #163341
    Prabin
    Participant

    Hi there,

    I am using both bbPress and buddyPress plugins in my site and I want this feature:

    any logged in user can vote to the topics/replies and using shortcode or any trick, I want them
    to show-up in certain page. I looked up most of the plugins in wordpress but couldn’t find my match.

    Any help ?

    ashu2106
    Participant

    i m trying to get the thumbnail of topic to show on Widget “Forum list”
    what i m trying to achieve are

    1. trying to get the feature image funtionality on front end so user can have the option to upload image about the Topic
    2. get the feature image on Widget “Forum list” Default widget of BbPress plugin

    i m not developer, as i have feature image in admin using some code found here.
    Please provide some suggestions

    looking for quick reply, as i have to use this feature in website.
    thanks

    #163335
    Robin W
    Moderator

    the code should still work.

    Try

    https://wordpress.org/plugins/bbp-style-pack/

    there is a setting in forum display that should do the same function

    #163332
    sanjaynakate
    Participant

    Finally i have got the answer.
    Bellow are the step.
    1) Get user current user id.

    <?php $user_id = get_current_user_id(); ?>

    2)set new user forum role you wish to change

    <?php $new_role_forum_role="bbp_participant"; ?>

    3)fire function.

    <?php bbp_set_user_role( $user_id, $new_role_forum_role );?>

    now check your user in back end and see forum user role.

    Full snippet code

    <?php
    $user_id = get_current_user_id();
    $new_role_forum_role=”bbp_participant”;
    bbp_set_user_role( $user_id, $new_role_forum_role );
    ?>

    #163329
    u_Oi
    Participant

    Hi People!

    Please, some help to solve this:

    1. I would like to have the code to center text, images, and things in the editor of bbpress. Any idea? (If i write <center></center> in the editor the text after the code change their size :/ ).

    2. Simple, how can i add a double space to text in the editor? (if i tap a double enter, it should show a double space)

    Wordpress 4.2.2
    Bbpress 2.5.7

    Thank You!

    #163320
    subz
    Participant

    What is the shortcode for listing all topics belonging to two or more forums (multiple forum ids)??

    #163318
    lisigef
    Participant

    I copied the code in https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#16-adding-description-to-forum-pages but there seems to be a problem with it and I’m just getting a blank page when I try to view the forum (When I comment out the code, the page shows up again, but of course without the description).

    I added the code to functions.php – is it supposed to go somewhere else? IS there some update needed to this code, given that it is a year later?

    Thanks in advance!

    #163310
    nap14hockey
    Participant

    When I use the bbpress index shortcode, it shows only the first 3.5 forums (notice I said 3.5 because the 4th one only the title is shown. I have 7 forums, and I need them to display on the forums page?

    Thanks
    Nap14hockey

    #163299
    project_subdomain
    Participant

    thanks, sam. tried several codes, nothing worked unfortunately (blank page):(

    add_action( 'loop_start', 'divs_only_when_logged_in' );
    
    function divs_only_when_logged_in() {
    
    <?php if ( is_user_logged_in() ) {?>
     
        <div class="new-reply-link">
    
    	<a href="<?php bbp_topic_permalink(); ?>#new-post
    "class="reply-link-text">Reply</a> 
        </div></br>
    
    <ul id="bbp-topic-<?php bbp_topic_id(); ?>-lead" class="bbp-lead-topic">
    
    	<li class="bbp-header">
    
    		<div class="bbp-topic-author"><?php  _e( 'Author',  'bbpress' ); ?>
    </div>
    
    <?php endif; ?>
    }  
    ?>
    #163291
    Sam Rohn
    Participant

    try the wp “is_user_logged_in” function

    https://codex.wordpress.org/Function_Reference/is_user_logged_in

    <?php
    if ( is_user_logged_in() ) {
    	echo 'Welcome, registered user!';
    } else {
    	echo 'Welcome, visitor!';
    }
    ?>

    or

    <?php if ( is_user_logged_in() ) { ?>
    <p>Welcome logged in user<p>
    <?php endif; ?>

    sam

    #163290
    project_subdomain
    Participant

    Hi,
    is there anyone who can help me to get this part

    <div class="new-reply-link">
    
    	<a href="<?php bbp_topic_permalink(); ?>#new-post
    "class="reply-link-text">Reply</a> 
    </div></br>
    
    <ul id="bbp-topic-<?php bbp_topic_id(); ?>-lead" class="bbp-lead-topic">
    
    	<li class="bbp-header">
    
    		<div class="bbp-topic-author"><?php  _e( 'Author',  'bbpress' ); ?>
    </div>
    
    <!-- .bbp-topic-author -->
    

    into an if-statement for logged in users?

    I suppose that
    <?php if ( bbp_is_user_logged_in() ) { ... } ?>
    does not work that simple due to the additional php within, right?
    (no success so far..)

    #163284
    Robkk
    Moderator

    This custom function should remove the “forums” in the breadcrumbs.

    Put it in your child theme functions.php or a functionality plugin to place custom code snippets.

    function rkk_custom_bbpbreadcrumbs() {
        // Remove Forum root from bbPress breadcrumbs
        $args['include_root']    = false;
        return $args;
    }
    
    add_filter('bbp_before_get_breadcrumb_parse_args', 'rkk_custom_bbpbreadcrumbs');
    #163283

    In reply to: Lestify

    Robkk
    Moderator

    your theme thinks bbPress is a blog post.

    usually modifying the main bbPress template will help fix this.

    https://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    #163274
    Robin W
    Moderator
    #163269
    Robkk
    Moderator

    I meant remove the <pre>

    #163267
    Sktella
    Participant

    Sorry, I just retyped my problem. I forgot to encode the error code.

    Hi,
    I expect to add a Login/Logout to the menu,however,I encountered this syntax error (indicating in the title) while editing the theme functions.php. According to the error message,
    $loginlink = '</pre><ul><li><a title='Logout' href="'.$url2.'">Logout</a></li></ul><pre>';
    is the code causing this parse error.
    Since this code is provided in the documentation and works fine for others, I wonder what the problem is.
    Hope you can help. Thank you so much!

    #163266
    Sktella
    Participant

    Hi,

    I expect to add a Login/Logout to the menu,however,I encountered this syntax error (indicating in the title) while editing the theme functions.php. According to the error message,

    $loginlink = ‘

    ';
    
    is the code causing this parse error. 
    
    Since this code is provided in the documentation and works fine for others, I wonder what the problem is.
    
    Hope you can help. Thank you so much!
    
    #163257

    In reply to: Change colour

    Robkk
    Moderator

    you still have an issue??

    usually people forget the <?php at the start of the functions.php file in their child theme?? if that is it.

    You can also just create a new one then see what code is screwing up your site.

    #163252
    Robkk
    Moderator

    Just shy away from using shortcodes for forum pages , it will be time consuming. You would have to possibly create pages for all instances of any bbPress page. This includes topic pages and user profile pages.

    The way you could get a non-fullwidth layout is to contact your theme author , which I think is Avada for help. Since they have more knowledge of how the theme works and I can’t just buy a theme and test it out and tell you what to do to have this layout.

    You could also do this manually with my help guiding you, but you would need some basic knowledge of how WordPress templates work.

    This guide will help with getting the layout , you would need to add the sidebar code back in like how the example template has. Please note that that is just an example template and is not something to copy and paste since all themes are different.

    https://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    #163251
    Robkk
    Moderator

    I interprete your “use WordPress as CMS not as blog” as : use “show static page” instead of “show last posts” in “customization”…

    CMS is an acronym content management system, and what I mean is instead of using WordPress for creating blog posts you can just use to manage your forums, users, etc.

    So I should put the bbPress root template as this static page. and fix the root folder as “” ?
    that what you suggest ?

    You could use the forum index shortcode [bbp-forum-index] or [bbp-topic-index] and place this in a page and make that your front page if that is what you want.

    Or create a custom homepage template to use like this site has.

    Read this for information about that. Creating Page Templates

    bbPress

    I don’t want to have a “/forum” in the URL.

    As for removing that I dont think you can , you can remove /forums though in settings > forums.

    You can rename /forum to whatever you want though.

    #163238
    coffeywebdev
    Participant

    Hello Everyone!

    I have my forums installed and I am happy with it. Now I would like to add a checkbox to the edit profile screen..

    I know in form-user-edit.php I can find the code that displays the fields, but can someone give me some insight into how this information is processed once the form is submitted?

    I know that this hidden field holds the action name:
    <input type=”hidden” name=”action” id=”bbp_post_action” value=”bbp-update-user” />

    but after looking at the file bbpress\includes\users\functions.php, where that action is being defined I don’t see where I could add in the extra code to process the custom field if I were to add it.

    I hope I am being clear, all I want to do is add ONE checkbox to every users edit profile page(where they change password/email), and save to user_meta… I know how I can add the field to the front end, but am unsure of how the data gets processed…

    Thanks,
    Anthony

    #163225
    Robkk
    Moderator

    I think you would have to use Multi-site , there are parts of the multisite installation to include either sub-directories or sub-domains.

    And you do not have to use WordPress for a blog , you can just use it instead as a CMS.

    https://codex.wordpress.org/Create_A_Network

Viewing 25 results - 8,501 through 8,525 (of 32,505 total)
Skip to toolbar