• Resolved hebhansen

    (@hebhansen)


    Hi

    Footer on forum page has it’s own life. Looks like this on all other pages and like this on forum page. I would really like this to tag into FSE themes, so that it’s not an issue at all. How can I accomplish this?

    And in general, why is forum affecting the footer in the first place? Better class definition of the forum block maybe, so that it does not tag into root etc…

    These are my forum layout settings for now, that seem to be the least destructive. Changing footer to standard does nothing.

    I am doing overwrites in css that seriously should be implemented in core. Otherwise forum is not responsive and does not adapt the width of WP FSE core. like so:

    /******************** Forum Container - Large Screen **********************/
    .bbpress-container.bsp-fse-container {
    width: var(--wp--style--global--wide-size) !important;
    }

    /******************** Forum Container - Smaller screen **********************/
    @media screen and (max-width: 1035px) {
    .bbpress-container.bsp-fse-container {
    width: 90%;
    }
    }

    Widths as variable in FSE:

    • var(–wp–style–global–wide-size)
    • var(–wp–style–global–content-size)

    Making those selectable it will work out of the box instead of default 75%

    Also making the footer change above. Now forum floats right!!!!!! Last week it floated left!!!

    I am sorry but using bbpress is a truly frustrating endeavour. Could some please develop a forum block that has these settings and does not affect everything outside it’s block/container. What on earth is going on here? It’s buggy at best.

    Any ideas thx

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter hebhansen

    (@hebhansen)

    I am trying to style forum heading. How do I accomplish this? Below is not working…

    .bbpress-container.bsp-fse-container .alignwide.wp-block-query-title h1 {
    font-size: 8rem !important;
    font-weight: medium !important;
    }
    Thread Starter hebhansen

    (@hebhansen)

    Fixed like so:

    .bbpress-container.bsp-fse-container h1.alignwide.wp-block-query-title

    Footer still an issue

    Thread Starter hebhansen

    (@hebhansen)

    Digging further here.

    This breaks on bbpress pages footer. Please fix. Changing this on my site will affect the entire site. What happens is that right column in footer floats left. FSE use this selector “body .is-layout-flex” that then screws up.

    .wp-block-group.is-vertical.is-content-justification-center.is-layout-flex.wp-container-core-group-is-layout-9 wp-block-group-is-layout-flex {
    display: flex;
    }

    Also this breaks on forum pages. In footer menus the gap betwen meu and other items. Apparently this relates to flex, but does not fix by just changing the above.

    :root :where(.is-layout-flex) {
    gap: 1.2rem;;
    }
    Plugin Author Robin W

    (@robin-w)

    Thanks for your continued digging into this.

    I tried to get bbpress working with FSE themes, but my knowledge is limited.

    This plugin has just been released, which I think will achieve what you want

    Enable bbPress for Block Themes – WordPress plugin | ww.wp.xz.cn

    Can you give it a try, and provide feedback here

    Thread Starter hebhansen

    (@hebhansen)

    Hi @robin-w

    That’s a good find. Just starting to make it work. It is not compatible with bbp Style Pack, so I will turn it off, since the block thing works and my footer displays correct. Hence, I will CSS everything. That means some stuff breaks and I was hoping you have some leads to get those working with snippets:

    1. Adding subject – How can I default people to subscribe to their post?
    2. Subject counts – How can I remove the (0,0) count
    3. Forum image – Is there a snippet way I can get the forum images back?

    I will test Gutenberg editor, once I have sorted my other stuff.

    Thread Starter hebhansen

    (@hebhansen)

    I forgot: How could I remove Frontpage from breadcrumb?

    Actually now I got that sorted but the seperator remains. So how do I target the first seperator only?

    Plugin Author Robin W

    (@robin-w)

    If you are using ‘enable bbpress for bocks’ then in Dashboard>settings>bbp style pack>theme support you need to turn off theme support,

    Then the 2 should work together

    Thread Starter hebhansen

    (@hebhansen)

    Hi @robin-w

    I have seen too much incompatibility with style pack and I am quite close to what I want through CSS. I prefer to keep things together like this.

    All I need is the 3 items mentioned above. If you know How to make those work, it will be a great help. Thx

    Thread Starter hebhansen

    (@hebhansen)

    Adding image. This works for me and adds link to the featured image:

    // Add Featured Image box to forums
    add_post_type_support('forum', array('thumbnail'));

    function ks_forum_icons() {
    if ( 'forum' == get_post_type() ) {
    global $post;

    // Check if the forum has a featured image
    if ( has_post_thumbnail($post->ID) ) {
    // Get the forum's permalink
    $forum_url = get_permalink($post->ID);

    // Wrap the image in a link to the forum
    echo '<a href="' . esc_url($forum_url) . '" class="forum-icon-link">';
    echo get_the_post_thumbnail($post->ID, 'thumbnail', array('class' => 'alignleft forum-icon'));
    echo '</a>';
    }
    }
    }
    add_action('bbp_theme_before_forum_title','ks_forum_icons');

    Removing count from forum titles:

    // Remove topic and reply counts from all forum listings
    function remove_counts($args) {
    // Set 'show_topic_count' and 'show_reply_count' to false
    $args['show_topic_count'] = false;
    $args['show_reply_count'] = false;

    // Ensure the separator is correctly defined
    $args['separator'] = '';

    return $args;
    }
    add_filter('bbp_before_list_forums_parse_args', 'remove_counts');

    Plugin Author Robin W

    (@robin-w)

    try

    //Add reply subscribed
    function rew_default_reply_subscribed() {

    // Default value
    $topic_subscribed = true;

    // Get _POST data IE is this a first post of a topic?
    if ( bbp_is_topic_form_post_request() && isset( $_POST['bbp_topic_subscription'] ) ) {
    $topic_subscribed = (bool) filter_var( $_POST['bbp_topic_subscription'], FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH );

    // Get edit data IE either the author or someone else is editing a topic or reply
    } elseif ( bbp_is_topic_edit() || bbp_is_reply_edit() ) {
    $post_author = (int) bbp_get_global_post_field( 'post_author', 'raw' );
    $topic_subscribed = bbp_is_user_subscribed( $post_author, bbp_get_topic_id() );

    // Get current status
    } elseif ( bbp_is_single_topic() ) {
    //the user is writing a new reply ?
    $topic_subscribed = true;
    }

    // Get checked output
    $checked = checked( $topic_subscribed, true, false );

    // Filter & return
    return apply_filters( 'bsp_default_reply_subscribed', $checked, $topic_subscribed );
    }


    add_filter ('bbp_get_form_topic_subscribed', 'rew_default_reply_subscribed');
    Thread Starter hebhansen

    (@hebhansen)

    Hi @robin-w

    It works thx. I was searching for a solution to this, but did not find anything. So status is:

    The block theme compatibility plugin, does the trick and gives me a cool template for design forum in FSE. I have concentrated styling in css, hence, the style pack is for now off, for simplicity. The footer in TT5 is fixed and displays normal. I got featured thumb back using code above. The count in titles is removed using code above and new stuff is now auto subscribed using your snippet above.

    Regarding Gutenberg editor everywhere. The plugin Blocks Everywhere clearly states, it is not compatible with block themes. Activating the plugin, breaks my site immeadiately. So getting to settings of the plugin is a stretch. Do you know where I configure it? Settings, Tools or other?

    I will mark as solved and start other threat later if I run into issues.

    Thx

    Plugin Author Robin W

    (@robin-w)

    Plugin Author Robin W

    (@robin-w)

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

The topic ‘FSE Footer misbehavin’’ is closed to new replies.