Skip to:
Content
Pages
Categories
Search
Top
Bottom

style pack not working with generatepress

Viewing 21 replies - 1 through 21 (of 21 total)

  • Robin W
    Moderator

    @robin-w

    would need a link to your site


    splintercell
    Participant

    @splintercell

    http://www.livingdipfree.com

    Its almost like I am just missing some checkbox somewhere to get it to load. The forum is under “community” tab at the top. Need to take a sec to register to access. Thank you very much for the response and the plugin. I hope I can get it to work.


    Robin W
    Moderator

    @robin-w

    hmm…can’t see that bbpress is loading either, so since I can’t access the forum, I suspect you have it set somewhere to only load on forum pages ?


    splintercell
    Participant

    @splintercell

    Hey robin – once you register and log in, click “community” tab at the top, or “forums, quit groups” on the right – both will take ou to the same place.

    thx!


    Robin W
    Moderator

    @robin-w

    the issue is with auto optimise which is not loading the style sheet as far as I can see


    splintercell
    Participant

    @splintercell

    Thank you Robin for taking a look – much appreciated


    Robin W
    Moderator

    @robin-w

    🙂


    budget101
    Participant

    @budget101

    @robin I am experiencing the exact same issue, even when using ?ao_noptimize=1 to shut off Autoptimize for testing.

    I also use GeneratePress (pro), and bbpress with bbpstylepack .

    The individual forums show perfectly, but the index is very broken and missing proper styling.

    The issue can be seen here https://www.budget101.com/community/


    Robin W
    Moderator

    @robin-w

    ok, this looks consistent to me – it might be a caching, browser or logged in vs logged out issue.

    If you still have issues, can you post a link to an image with some pointers as to what is not displaying correctly


    budget101
    Participant

    @budget101

    Thank you for your reply, I just got it a few minutes ago by copying files into the loop-forums.php

    I do have one other weird issue- The header “Community” is linked to a particular forum and I can’t seem to figure out how or why.

    Any ideas why it’s randomly pulling the last forum created as a link?


    Robin W
    Moderator

    @robin-w

    ok, your kinda leaving me guessing here as I have no idea what should be showing where 🙂

    when I go into community I get what looks like a large forum list.


    budget101
    Participant

    @budget101

    Sorry, so on that main forum index page, the Header, “Community” becomes a clickable link to the last created forum in the site.

    bad link

    My question, is, where/what template would insert this as a link? and why did it pick the latest forum created…


    budget101
    Participant

    @budget101

    I just created a new forum as a test, (called “test”) and when I did, the “Community” header just changed links, now it links to the Test forum. I’d like to remove the link entirely.

    new-forum-test


    Robin W
    Moderator

    @robin-w

    ok this is theme/page/wordpress setup rather than bbpress – if you look at the HTML then bbpress starts below this with

    <div id="bbpress-forums" class="bbpress-wrapper">

    above this – it is not bbpress doing it.


    budget101
    Participant

    @budget101

    Thank you for that Robin, I was able to find it in the theme coding based on your assistance.

    	if ( ! is_singular() ) {
    		$params = array(
    			'before' => sprintf(
    				'<h2 class="entry-title"%2$s><a href="%1$s" rel="bookmark">',
    				esc_url( get_permalink() ),
    				'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : ''
    			),
    			'after' => '</a></h2>',
    		);
    	}

    Do you know how I could exclude the forum link from this?


    Robin W
    Moderator

    @robin-w

    ok, so which method in

    Step by step guide to setting up a bbPress forum – Part 1

    item 3

    are you using to display this page?


    budget101
    Participant

    @budget101

    Method 2
    WP Page: Named Community
    Slug Name: Community
    Code within the page: [bbp-forum-index]

    also, I forgot to include the function, here’s the full code that calls the issue:

    function generate_get_the_title_parameters() {
    
    if ( ! is_singular() ) {
    		$params = array(
    			'before' => sprintf(
    				'<h2 class="entry-title"%2$s><a href="%1$s" rel="bookmark">',
    				esc_url( get_permalink() ),
    				'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : ''
    			),
    			'after' => '</a></h2>',
    		);
    	}
    
    	return apply_filters( 'generate_get_the_title_parameters', $params );
    }

    Robin W
    Moderator

    @robin-w

    ok so something like

    add_filter ('generate_get_the_title_parameters' , 'rew_community', 10 , 1) ;
    
    function rew_community ($params) {
    	if (is_page ('community')) {
    		$params = array(
    			'before' => sprintf(
    				'<h2 class="entry-title"%2$s><a href="%1$s" rel="bookmark">',
    				esc_url( get_page_by_title( 'community' ) ) ),
    				'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : ''
    			),
    			'after' => '</a></h2>',
    		);
    	
    	}
    return $params ;
    }

    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


    budget101
    Participant

    @budget101

    Got it with a few tweaks, thanks so much for your help Robin, I greatly appreciate it.


    Robin W
    Moderator

    @robin-w

    great – can you post your final solution to help others who might find this post 🙂


    budget101
    Participant

    @budget101

    certainly, it is:

    add_filter( 'generate_get_the_title_parameters', function( $params ){
    	if ( bbp_is_forum_archive() ) {
            $params = array(
                'before' => sprintf(
                    '<h2 class="entry-title"%s">',
                    'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : ''
                ),
                'after' => '</h2>',
            );  
        }
        return $params;
    },10,1 );
Viewing 21 replies - 1 through 21 (of 21 total)
  • You must be logged in to reply to this topic.
Skip to toolbar