Forum Replies Created

Viewing 15 replies - 1 through 15 (of 365 total)
  • George

    (@quantum_leap)

    Hello,

    As per WordPress guidelines, we are not allowed to discuss Pro products in this forum. For GB Pro related question, please visit the premium forums. Otherwise, for any pre-sale requests, please visit this form.

    George

    (@quantum_leap)

    Great, no problem!

    George

    (@quantum_leap)

    Hi,

    Unfortunately, here is no way to achieve that currently.

    George

    (@quantum_leap)

    Hello,

    I am not able to view the page since it’s under maintenance mode. How did you insert the icon? You can insert a Shape block and upload an icon or use a custom SVG. Width and Height values are available.

    Alternatively, you could have a GB text block with your text and select an icon that would appear on the left or right of the text.

    George

    (@quantum_leap)

    Ok, no problem!

    George

    (@quantum_leap)

    Hi there,

    I believe you are seeing the new way that WP 7 handles patterns. It wraps them into a group container where you have to enter into edit mode to edit the pattern (or double click it to start editing).

    Then, you would be able to see the blocks in the list view. You can also detach the pattern from this view.

    George

    (@quantum_leap)

    Great, thank you!

    George

    (@quantum_leap)

    Hello,

    Since you are a GPP subscriber, please, contact us through the premium forums and post a URL with the issue so we could have a closer look!

    George

    (@quantum_leap)

    Not a problem!

    George

    (@quantum_leap)

    Glad to hear it.

    Since GP’s comments.php outputs the prev/next navigation inline (rather than via a hooked function), the cleanest way to swap it for numbered pagination is to copy comments.php into your child theme and edit the two nav blocks.

    Copy wp-content/themes/generatepress/comments.php to wp-content/themes/your-child-theme/comments.php, then in both <nav> blocks (#comment-nav-above and #comment-nav-below):

    1. Add comment-pagination to the class list:
    
    <nav id="comment-nav-above" class="comment-navigation comment-pagination" role="navigation">
    

    2. Replace the two .nav-previous / .nav-next divs with paginate_comments_links():

    
    <?php
    echo paginate_comments_links( array(
        'echo'      => false,
        'prev_text' => __( '&larr; Previous', 'generatepress' ),
        'next_text' => __( 'Next &rarr;', 'generatepress' ),
        'type'      => 'list',
    ) );
    ?>
    

    That outputs a <ul class="page-numbers"> with <li> items for each page, plus next/previous links. Then add this to Customizer → Additional CSS to style it:

    
    .comment-pagination .page-numbers {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        list-style: none;
        margin: 20px 0;
        padding: 0;
    }
    .comment-pagination .page-numbers li {
        margin: 0;
    }
    .comment-pagination .page-numbers a,
    .comment-pagination .page-numbers span {
        display: inline-block;
        padding: 8px 14px;
        border: 1px solid #444;
        border-radius: 4px;
        text-decoration: none;
        line-height: 1;
        color: inherit;
        transition: background 0.15s ease, color 0.15s ease;
    }
    .comment-pagination .page-numbers a:hover {
        background: #444;
        color: #fff;
    }
    .comment-pagination .page-numbers .current {
        background: #7e22ce;
        color: #fff;
        border-color: #7e22ce;
    }
    .comment-pagination .page-numbers .dots {
        border: none;
        padding: 8px 4px;
    }
    

    To summarize, the child theme version of the comments.php file would look like this:

    
    <?php
    /**
     * The template for displaying Comments.
     *
     * @package GeneratePress (modified for numbered comment pagination)
     */
    if ( ! defined( 'ABSPATH' ) ) {
        exit;
    }
    
    if ( post_password_required() ) {
        return;
    }
    
    /**
     * generate_before_comments hook.
     */
    do_action( 'generate_before_comments' );
    ?>
    <div id="comments">
        <?php
        do_action( 'generate_inside_comments' );
    
        if ( have_comments() ) :
            $comments_number = get_comments_number();
            $comments_title = apply_filters(
                'generate_comment_form_title',
                sprintf(
                    esc_html(
                        /* translators: 1: number of comments, 2: post title */
                        _nx(
                            '%1$s thought on &ldquo;%2$s&rdquo;',
                            '%1$s thoughts on &ldquo;%2$s&rdquo;',
                            $comments_number,
                            'comments title',
                            'generatepress'
                        )
                    ),
                    number_format_i18n( $comments_number ),
                    get_the_title()
                )
            );
    
            // phpcs:ignore -- Title escaped in output.
            echo apply_filters(
                'generate_comments_title_output',
                sprintf(
                    '<h2 class="comments-title">%s</h2>',
                    esc_html( $comments_title )
                ),
                $comments_title,
                $comments_number
            );
    
            do_action( 'generate_below_comments_title' );
    
            if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
                ?>
                <nav id="comment-nav-above" class="comment-navigation comment-pagination" role="navigation">
                    <h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'generatepress' ); ?></h2>
                    <?php
                    echo paginate_comments_links( array(
                        'echo'      => false,
                        'prev_text' => __( '&larr; Previous', 'generatepress' ),
                        'next_text' => __( 'Next &rarr;', 'generatepress' ),
                        'type'      => 'list',
                    ) );
                    ?>
                </nav><!-- #comment-nav-above -->
            <?php endif; ?>
    
            <ol class="comment-list">
                <?php
                wp_list_comments(
                    array(
                        'callback' => 'generate_comment',
                    )
                );
                ?>
            </ol><!-- .comment-list -->
    
            <?php
            if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
                ?>
                <nav id="comment-nav-below" class="comment-navigation comment-pagination" role="navigation">
                    <h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'generatepress' ); ?></h2>
                    <?php
                    echo paginate_comments_links( array(
                        'echo'      => false,
                        'prev_text' => __( '&larr; Previous', 'generatepress' ),
                        'next_text' => __( 'Next &rarr;', 'generatepress' ),
                        'type'      => 'list',
                    ) );
                    ?>
                </nav><!-- #comment-nav-below -->
                <?php
            endif;
        endif;
    
        // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
        if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
            ?>
            <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'generatepress' ); ?></p>
            <?php
        endif;
    
        comment_form();
        ?>
    </div><!-- #comments -->
    



    George

    (@quantum_leap)

    Hi there,

    This is GP’s standard comments markup, not your PHP. comments.php outputs .comment-navigation both before (#comment-nav-above) and after (#comment-nav-below) .comment-list. Normally the list sits between them so you don’t notice, but this rule in your CSS:

    
    .comments-title, .comment-list, .comment-navigation {
        order: 1 !important;
    }
    

    …gives all four elements (title, list, and both navs) the same order, so they collapse together.

    Replace that single rule with:

    
    .comments-title {
        order: 1 !important;
    }
    #comment-nav-above {
        order: 2 !important;
    }
    .comment-list {
        order: 3 !important;
    }
    #comment-nav-below {
        order: 4 !important;
    }
    

    Everything else in your CSS can stay as-is. Let me know how it looks.

    George

    (@quantum_leap)

    Hi Andy,

    The Times New Roman fallback means the browser can’t find the font — most likely a name mismatch. The font-family name you type into the custom field needs to match exactly what’s declared in your @font-face CSS, including capitalization and no spaces.

    For example, if your CSS says:

    @font-face {
    font-family: "EquitySansAltExtralight";

    }

    Then you need to enter EquitySansAltExtralight (no spaces) in the custom field.

    Could you also confirm that EquitySansAlt.css is being loaded on the frontend of your test site? You can check by viewing the page source and searching for EquitySansAlt.

    George

    (@quantum_leap)

    Hi Andy,

    Could you double-check that the updated filter code from Ying is in your functions.php and saved correctly? Also, are you seeing any PHP errors on the site?

    If everything looks correct, could you also try deactivating all other plugins except GenerateBlocks, then check the dropdown again — just to rule out a plugin conflict.

    George

    (@quantum_leap)

    Hi Andy,

    The reason you’re not seeing the CSS in the page source is that enqueue_block_editor_assets only loads the stylesheet in the block editor, not on the frontend. You’ll need a second hook to load it there too. Update your functions.php like this:

    // Load fonts in the block editor
    add_action( 'enqueue_block_editor_assets', function() {
    wp_enqueue_style(
    'equitysansalt-editor',
    get_stylesheet_directory_uri() . '/EquitySansAlt.css',
    array(),
    '1.0'
    );
    } );

    // Load fonts on the frontend
    add_action( 'wp_enqueue_scripts', function() {
    wp_enqueue_style(
    'equitysansalt',
    get_stylesheet_directory_uri() . '/EquitySansAlt.css',
    array(),
    '1.0'
    );
    } );

    Once that’s in place, check the frontend page source again and you should see it loading. Let us know how you get on!

    George

    (@quantum_leap)

    Hello,

    Could you let us know where your @font-face declarations are — are they in your child theme’s style.css or in the separate EquitySansAlt.css file?

Viewing 15 replies - 1 through 15 (of 365 total)