• Resolved mykoliux

    (@mykoliux)


    Hi, I love the Query Loop Load More plugin (https://wordpress.com/plugins/query-loop-load-more) but in my posts I have get back button, that gets back to the main query loop page. My get back button works fine when the posts aren’t under load more button, but with those who are, it automatically gets back to query loop page the load more button (unpressed). How could I fix this, when get back button is pressed in those post that are under load more, it would get them back to the already pressed load more page.
    I hope I was clear 🙂
    PS. Also is there any way for the plugin to only load 15 more posts and then show load more again?

    My ‘get back’ button code if needed:

    add_action( 'astra_single_post_banner_before', 'custom_back_button_before_banner' );
    function custom_back_button_before_banner() {
    if ( is_single() && is_singular( 'post' ) ) {
    $categories = wp_get_post_categories( get_the_ID() );
    $allowed_ids = array( 10, 11 ); // Recenzijos ir Naujienos ID

        if ( array_intersect( $categories, $allowed_ids ) ) {
    echo '<div class="custom-back-button-container">
    <a href="javascript:history.back()" class="ast-back-button">← <span class="back-text">Grįžti atgal</span></a>
    </div>';
    }
    }

    }

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

The topic ‘‘Get back’ button from posts doesn’t work with Query Loop Load More plugin.’ is closed to new replies.