Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,176 through 2,200 (of 32,461 total)
  • Author
    Search Results
  • neon67
    Participant

    Thanks everyone! Found a solution in the bbpress codeх

    #216003

    In reply to: Creating a new topic

    chalkie1983uk
    Participant

    Sadly when I use the following ccs code:

    .bbp-form {
    display: none;
    }

    the form also disappears from the custom page I made.

    Just feels that this isn’t going to work for me and thus should look into alternative forum software.

    neon67
    Participant

    Oh thanks. This is almost what I wanted.

    But instead of
    today – shown “no answers”
    yesterday – “1 day ago”
    …. where and that this changing?

    What mean —between comma “,” and “ago”—- this code slice: .*[^ago]/’ ..?

    wpturk
    Participant

    You can remove everything between comma “,” and “ago” this way: (put in functions.php)

    function short_time ($output) {
        $output = preg_replace( '/, .*[^ago]/', ' ', $output );
        echo $output;
    }
    add_action ('bbp_get_time_since', 'short_time') ;
    #215987
    wpturk
    Participant

    you can try something like this:

    function custom_logged_in_replies($posts){
        if (!is_user_logged_in()){
            $posts = null;
                echo 'Login to see the replies';
        }
        return $posts;
    }
    
    add_filter('bbp_has_replies', 'custom_logged_in_replies');
    #215986
    Robin W
    Moderator

    this will display any topics which have no topic tags I think

    add_shortcode ('empty-tags' , 'rew_empty_tags' ) ;
    
    function rew_empty_tags () {
    	$args = array( 'post_type' => 'topic', 'posts_per_page' => -1 );
    	$loop = new WP_Query( $args );
    	$output = '' ;
    	while ( $loop->have_posts() ) : $loop->the_post();
    		$current_id = get_the_ID();
    		$topic_tags = bbp_get_topic_tag_names( $current_id );
    		if (empty ($topic_tags)) $output.= '<br>'.$current_id ;
    	endwhile;
    	
    	return $output ;
    }

    create a private page and put the shortcode

    [empty-tags] in it

    #215982
    Robin W
    Moderator

    the original function is in

    bbpress/includes/common/template.php and starts on line 2227

    line 2419 creates the breadcrumb and to hide you would hide class bbp-breadcrumb-forum

    line 2478 is the best place to change what you want, you would use that filter and cycle though the breadcrumb array and amend or take out the forum one.

    Sorry beyond my time availability to code this for you.

    #215968
    mibrenner
    Participant

    Hi –

    Rather than using the default ‘forum’ page to display my forum, I am embedding the forum on a custom static page using a shortcode.

    I’d like to update the breadcrumbs and either hide (preferred) the default forum name/URL, or, edit the forum URL. I doubt I can edit the URL, so I’m okay with hiding the URL and manually injecting the URL in my functions.php file using the arg [‘before’]. Unfortunately, I don’t see a way to hide the specific Forum from the breadcrumbs. See possible arguments here: https://github.com/ntwb/bbPress/blob/master/src/includes/common/template.php#L2277-L2303

    Out of the box:
    Home (/) » Forums (/forums) » Forum Title (/forums/forum/forum-title/) » Topic

    Ideal:
    Forum Title (/custom-page/) » Topic

    Actual (based on code below):
    Forum Title (/custom-page/) » Forum Title (/forums/forum/forum-title/) » Topic

    Here is the code I’m using to make that happen. Looking for a way to hide that second Forum Title.

    function custom_bbp_breadcrumb() {
        $args['before'] ='<div class="bbp-breadcrumb"><p><a href="/custom-page/" class="bbp-breadcrumb-forum">Forum Title</a><span class="bbp-breadcrumb-sep"> &raquo; </span>';
        $args['include_home'] = false;
        $args['include_root'] = false;
        return $args;
    }
    
    add_filter('bbp_before_get_breadcrumb_parse_args', 'custom_bbp_breadcrumb' );
    #215961
    Robin W
    Moderator

    @erich199 and @bodybyloud – I have now had a look at the code.

    I’m presuming both of you are using wordpress with blocks (ie the newer block editor rather than the classic editor) in posts and pages – I can see that this would not allow you to add topics for posts to new (or amend existing).

    But it would allow the display in posts for old ones.

    Is this what you are seeing ?

    If so I think I can help, if not – can you explain further what is not happening

    #215919
    patrick_here
    Participant

    Yes, I looked at it already. It’s alot of code and I cannot determine where the problem might be coming from. All of the files have the same timestamp however so the files are unchanged.

    #215909
    Robin W
    Moderator

    “This is also where to list garage/yard sales”

    this is in a div

    <div class="bbp-forum-content">This is also where to list garage/yard sales</div>

    or am I misunderstanding ?

    #215904
    patrick_here
    Participant

    Thanks very much Robin!
    …that suggestion to target #bbpress-forums worked!

    I’m getting a crash course in why some people like Elementor and others don’t. I think I’m in the latter camp.

    🙂

    One final comment: I’m surprised that bbpress code is outputting text as important as the forum description without surrounding it in tags so that it could be specifically targeted by some css.

    #215896
    Ulrik
    Participant

    Thanks, the shortcode did the job.

    [bsp-display-topic-index show=’5′ template =’short’]

    Thanks!

    #215895
    iconuser
    Participant

    Self-resolved.
    I used bbp_is_single_forum() to specify a forum with forum ID:2 by using is_single( 2 ) instead of all forums.

    #215894
    iconuser
    Participant

    Nice to meet you.
    I am currently creating a bulletin board service and would like to display the text formatting in the topic creation form, and I am using the URL below as a reference.
    https://bbp-customize.com/topic-form-template/

    In this article, you say “The above code sets up a common format for all the forums, but you can also set up a separate format for each forum by splitting it up by forum ID”, but I don’t know how to split it up for each forum ID.

    I’ve looked it up, but it doesn’t work and I’m stuck.

    Specifically, I would like to know how to display the text formatting only for forum ID:2 when there are forums with forum ID:1 and forum ID:2.

    Sorry this is a very rudimentary question, thank you for your help.

    #215888
    Robin W
    Moderator

    this might also improve things

    #bbpress-forums {
    	font-family: "c", Sans-serif !important;
    }

    otherwise I see you have style pack installed, so work through the font sections and make them “Playfair Display”, Sans-serif

    #215887
    Robin W
    Moderator

    agree

    on the title this might work

    .post-285 h1.entry-title {
    	font-family: "Playfair Display", Sans-serif;
    }
    #215886
    patrick_here
    Participant

    Hmmm… Thanks very much Robin…

    Someone else implemented this website with elementor (free version) …I’ve never worked with Elementor before.

    As best as I can tell, that post-26.css is a generated css file generated under uploads/elementor/css/post-26.css. Perhaps this is really an elementor question…

    In view of the fact that I’m using a shortcode on a page to get my forum index to appear, I’m trying to figure out how to get the forum to appear on the page in a way that will leave me free to style the forum:

    • As it is now the entire forum inherits the elementor styles. (I would need the header and footer from the elementor theme but wouldn’t want the elementor styling in the body where the forum bbPress shortcode is located)
    • A separate problem is that, in at least some cases, it seems that the forum description text itself is not surrounded by any html tag at all so it seems that I would not be able to target it with a specific css selector …it could only inherit styling from an outer selector higher up the chain.
    #215885
    Robin W
    Moderator

    it is caused by this line

    .elementor-kit-26 h1 {
     font-family:"Playfair Display SC", Sans-serif;
    }

    in

    post-26.css

    related to elementor, so may be a setting in that or your theme.

    In essence the Playfair Display SC font is all capitals

    https://fonts.google.com/specimen/Playfair+Display+SC

    so all your headings will be capitals

    #215880
    patrick_here
    Participant

    Hello,
    I just installed bbpress on a new website. I have given descriptions (or subtitles) to some of the forums. On the forum index, these descriptions show up in all uppercase (And when I check the code in Firefox Inspector I can see that there isn’t even any styling tag around the descriptions).

    I can’t figure out what the problem is. What is causing this and how should I fix it? Thanks for the help.

    Patrick

    #215874
    Robin W
    Moderator

    ah, I see what you ae getting at – not sure how this site does it, but you can create a link to a page in your site and put

    [bbp-topic-index] in that page – that will show the latest 15 topics

    If you want better than that, then

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>shortcode

    and check out the

    [bsp-display-topic-index] which has lots of settings you can use to control what is shown

    dashboard>settings>bbp style pack>Custom CSS

    #215855
    Robin W
    Moderator

    If I understand

    add_action ('bbp_theme_after_topic_form_tags' , 'rew_tag_desc' ) ;
    add_action ('bbp_theme_after_reply_form_tags' , 'rew_tag_desc' ) ;
    
    function rew_tag_desc () {
    	echo '<p>words here</p>' ;
    }

    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

    #215850

    In reply to: login issues

    kylewhenderson
    Participant

    I just installed the Ultimate Member plugin. The frontend login shortcode that comes with that plugin works as expected, so not sure what this issue is with the bbPress Login Widget, but something is certainly not right.

    I totally get that many people should be complaining if it were obviously broken, but especially after testing a clean WP core and bbPress install it seems that this isn’t likely to be an edge case.

    Again, let me know if you have any specific questions that I can help with to debug.

    Thanks!

    #215838
    Robin W
    Moderator

    just tried it on my website, and that code works fine.

    3 possibilities

    1. the 90 is wrong
    2. the 90 forum does not have sub forums
    3. some other code is filtering the bbp_forum_get_subforums function

    If you are happy it is not 1 or 2, then it could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users

    Health Check & Troubleshooting

    Then come back

    #215835
    yurius
    Participant

    I tried this but result is
    array(0) { }
    It’s still empty.

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