Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,701 through 2,725 (of 32,481 total)
  • Author
    Search Results
  • #211578
    desmond234
    Participant

    Theme – Aardvark

    Hey guys, I’m having an issue with how my theme is interacting with the bbpress subforum list. I added the bbpress style pack plugin because of a issue I was having with the search bar, but it resulted in all the subfourms piling up on one another. The issue arises because the subforums have a box background (which I like), but the background overlaps with the other subforums. You can see the issue I’m having here.

    http://www.podfolk.com/forums/

    Does anyone know any code I can put into the style or functions file to resolve the issue?

    #211573
    Robin W
    Moderator

    try adding this to your custom css

    div.bbp-forum-header, div.bbp-reply-header, div.bbp-topic-header, li.bbp-body div.hentry {
    	padding: 0px !important;
    }
    
    .oct-main-content {
    	padding: 0px !important;
    	
    }
    #211567
    Pete
    Participant

    I have a problem with the way breadcrumbs are being displayed on my search results screen.

    First of all, I have the following (amongst other things) in my functions.php file:

    
    /**
    Just a simple breadcrumb trail, but, importantly, don't double up when we're at the root
    **/
    function mycustom_breadcrumb_options() {
    	// Home - default = true
    	$args['include_home']    = false;
    	// Don't need breadcrumbs if we're at the root
    	if ( apply_filters( 'bbp_no_breadcrumb', is_front_page() ) ) {
    	// Forum root - default = true
    		$args['include_root']    = false;
    	// Current - default = true
    		$args['include_current'] = false;
    	}
    	return $args;
    }
    add_filter('bbp_before_get_breadcrumb_parse_args', 'mycustom_breadcrumb_options' );
    
    /**
    Search only the specified forum
    **/
    function my_bbp_filter_search_results( $r ){ 
        //Get the submitted forum ID
        $forum_id = sanitize_title_for_query( $_GET['bbp_search_forum_id'] );
        //If the forum ID exits, filter the query
        if( $forum_id && is_numeric( $forum_id ) ){
            $r['meta_query'] = array(
                array(
                    'key' => '_bbp_forum_id',
                    'value' => $forum_id,
                    'compare' => '=',
                )
            );  
        }
        return $r;
    }
    add_filter( 'bbp_after_has_search_results_parse_args' , 'my_bbp_filter_search_results' );
    

    I have a search box on the forum home page and on the index page for each individual forum. For general navigation around my forum the breadcrumbs are presented as one might expect and search results are confined to those relevant to the current forum (or all forums from the home page).

    The breadcrumbs on the Forum ‘home page’ show simply as Forums and on individual forum index pages as Forums > ForumName, where ‘ForumName’ is the name of the current forum, etc. A search request from the Forum home page returns results as expected, with the breadcrumbs displayed as Forums > Search > Search Results for 'search string'. However, while a search from one of the individual forum index pages returns the refined search results as expected, the breadcrumbs are always displayed as Forums > Search > Search Results for 'search string', they don’t include the name of the forum that has been searched (i.e. Forums > ForumName > Search > Search Results for 'search string'.

    I think I can see that the search is actually being applied to all forums, then refined by the relevant function in the functions.php file, so I think I can see why I might have to do a little extra work to get the relevant forum name displayed in the breadcrumb, but can anyone suggest how I might do this? It would seem that I should be able to add a little more code to my mycustom_breadcrumb_options() function, but what exactly…?

    Thanks for any assistance anyone can offer.
    (WordPress 5.4.1, bbPress 2.6.5, website: digitalconcepts.net.au/forum – Please note, this part of the website is ‘hidden’ from the home page, you need to navigate there via the above direct URL)

    #211535

    In reply to: bbPress Roadmap

    Dion Hulse
    Keymaster

    Like WordPress, bbPress uses a semi-decimal-based versioning system, where bbPress 2.4, 2.5, and 2.6 are considered major versions.

    bbPress 2.6 was a major update with just under 6 years of development:

    This version of bbPress has been in development for just a bit under 6 years (yikes!) over which 420 tickets were resolved via 1737 individual code commits.

    The Full list of releases is available on the bbPress codex, although it doesn’t have the full details for the latest two minor 2.6.x releases.

    #211523
    Robin W
    Moderator

    you could add this to your custom css

    .bbp-login-form {
    	width: 60% !important;
    }
    Robin W
    Moderator

    just remove the code

    and refresh your browser

    amirzwp
    Participant

    I think your code did something really bad, it redirects my forums now to other pages… what can I do?

    For example: https://www.paastoa.com/forum/intervallfasten/

    Robin W
    Moderator

    thanks, ok lets try this

    add_filter( 'wpseo_title', 'rew_meta_title' );
    function rew_meta_title( $title ) {
    global $post ;
           if ($post->post_type == 'reply' ) {
    	 $title = 'this is a reply' ;
        }
     return $title;
    }
    amirzwp
    Participant

    sure, yoast SEO (Also Premium version) is enabled.

    I tried both of the codes you sent me, both doesn’t have an effect on the Meta Title.

    The snippet with the following code is still activated on the website:

    add_filter( 'wpseo_metatitle', 'rew_meta_title' );
    function rew_meta_title( $title ) {
    global $post ;
           if ($post->post_type == 'reply' ) {
    	 $title = 'this is a reply' ;
        }
     return $title;
    }

    So you can check, if there happend something. I deleted the other snippet because it also didn’t had an effect on the website. But when it has an effect, it’s not so good because the website is live.

    Thanks for your time.

    Robin W
    Moderator

    thanks – just to ask the obvious, you are running the yoast plugin ?? 🙂

    then as a test can you try a correction to my previous code

    add_filter( 'wpseo_metatitle', 'rew_meta_title' );
    function rew_meta_title( $title ) {
    global $post ;
           if ($post->post_type == 'reply' ) {
    	 $title = 'this is a reply' ;
        }
     return $title;
    }

    if that fails, can you try (as a test only)

    add_filter( 'wpseo_metatitle', 'rew_meta_title' );
    function rew_meta_title( $title ) {
     $title = 'this is a reply' ;
       return $title;
    }

    This should put that phase at the top of every pages, and will at least show that the filter is working.

    amirzwp
    Participant

    You can check the Title in the Browser-Tab. Currently, it’s showing the following text:

    | Paastoa

    So it’s only the seperator and the website title…

    Also when you open the source code of the page, it shows:

    <title>| Paastoa</title>

    URL: https://www.paastoa.com/antworten/8907/

    Thanks for your help.

    #211501
    Robin W
    Moderator

    Sorry I’m just a bbpress user who helps out here. I don’t have time to research every part of code – the answer is no doubt yes.

    #211494
    zandercent
    Participant

    a bit hacky – but sure. Is there a way to disable just the part that shows all the other links on site? Or use a more standard forum link insertion method (that doesn’t mean adding a bbcode plugin)?

    Robin W
    Moderator

    I don’t have any sites with both yoast and forums on them (my forum sites are profession related sites with private forums so don’t want to advertise!).

    So I don’t know which part of the code is faulty.

    If you are able to test, then start with

    add_filter( 'wpseo_metatitle', 'rew_meta_title' );
    function rew_meta_title( $title ) {
           if ($post->post_type == 'reply' ) {
    	 $title = 'this is a reply' ;
        }
     return $title;
    }

    this should make the title of each reply ‘this is a reply’

    if that works, then we kwow the function is working, but not getting the right answer !

    If it doesn’t work, then I’ll come back with another

    amirzwp
    Participant

    And again, thank you very much for your help.

    It didn’t change anything on the BBPRESS – Reply Pages, for example:

    https://www.paastoa.com/antworten/8907/

    Is the code you sent me really for BBPRESS? I think it’s for the normal replies…

    #211488
    davelowe1977
    Participant

    Apart from the root forum which shows all the sub forums and nothing else, all my sub forums have a reply / new topic form tacked on at the bottom. I would like to remove this and replace it with two buttons: “New” and “Reply” which lead to a separate form/page with all the removed functionality. If I inspect the page code as it is, it is everything in this element tag:

    <div id=”new-topic-0″ class=”bbp-topic-form”>

    Is this possible? Thanks.

    WordPress 5.4.1
    BBPress Version 2.6.4 & default theme.

    #211487

    In reply to: first reply sticky

    Robin W
    Moderator

    I think this is what you are after

    bbp_show_lead_topic

    Put this in your child theme’s function file – or use

    Code Snippets

    Robin W
    Moderator

    ah, I understand, sorry not really into SEO

    try this

    add_filter( 'wpseo_metatitle', 'rew_meta_title' );
    function rew_meta_title( $title ) {
        global $post;
        if ($post->post_type == 'reply' ) {
    		$order = $post->menu_order ;
    		$post_parent = $post->post_parent ;
    		$topic_title = get_the_title ($post_parent) ;
            $title = $topic_title.' '.$order ;
        }
     return $title;
    }
    #211485
    Robin W
    Moderator

    you could just enqueue it

    bbp_enqueue_script( bbpress-editor-always, 'js/editor.js', array( 'jquery' ), '2.6.4', true );

    Robin W
    Moderator

    thanks – I’m just a user who helps out here, not a bbpress author.

    so

    1. can you confirm that the above plugin is not necessary – bbpress already does this ?

    2.

    can you try this code

    add_filter( 'wpseo_metadesc', 'rew_meta_desc' );
    function rew_meta_desc( $content ) {
        global $post;
        if ($post->post_type == 'reply' ) {
    		$order = $post->menu_order ;
    		$post_parent = $post->post_parent ;
    		$title = get_the_title ($post_parent) ;
            $content = $title.' '.$order ;
        }
     return $content;
    }

    Put this in your child theme’s function file – or use

    Code Snippets

    redevelop
    Participant

    OK thanks for looking at this anyway. I’m now thinking it may relate to the MySQL 8 settings, specifically SQL_MODE which included ‘STRICT_TRANS_TABLES’ (strict SQL mode > no zero dates).

    I’ve tried removing this setting from SQL_MODE (for both session & global), but this doesn’t seem to resolve – when logging in to MySQL as the WordPress user I still get this error

    Error Code: 1525. Incorrect DATETIME value: ‘0’

    when running the query:

    SELECT p.ID FROM wp_posts AS p WHERE p.post_date < ‘0’ AND p.post_type = ‘forum’ AND ( p.post_status = ‘publish’ OR p.post_status = ‘private’ OR p.post_status = ‘hidden’ ) ORDER BY p.post_date DESC LIMIT 1;

    If I make any more progress I’ll post it here 🙂

    reachingout
    Blocked

    The shortcode [bbp-topic-form] is a Form for “Create New Topic” when the user is logged in, and a Log-in-form (“You must be logged in to reply to this topic.”) when the user is not logged in.
    When someone is creating a new subject, it is good to have a wide space to write in, but when someone is logged out, the Log-in form is too wide.
    I think it is the same for [bbp-reply-form], for replying to already created topics (“You must be logged in to reply to this topic.”)

    Is there a solution to this problem?

    #211469
    Robin W
    Moderator

    put this is the custom css part of your theme

    #qt_bbp_reply_content_link {
    display : none ;
    }
    #211465
    zandercent
    Participant

    bbpress doesn’t load the the necessary scripts (reply.js etc) when embedding a topic as a shortcode. This is because of the conditional checks on line 158 of bbpress-functions.php

    if ( bbp_use_wp_editor() && is_bbpress() ) {

    #211464

    Topic: first reply sticky

    in forum Themes
    sadakhanal
    Participant

    what is the code to make the first reply of the topic as a sticky reply by default ?

    i am trying to arrange the replies in descending order and the topic content is not showing on the top of the replies.

    Question 2: Is it possible to show topic content under topic title, not on the replies? This will give me more options to arrange replies according to my requirement. [while i am using <?php bbp_topic_content(); ?> under topic title, the topic content is displaying in replies also]

Viewing 25 results - 2,701 through 2,725 (of 32,481 total)
Skip to toolbar