Site logo

Archived topic

WpShoPostPro load same post with load more button on GP Premium

14 replies · Started by Alessio Angeloro on March 2, 2021

Viewing posts 1–15 of 15

Hi,

I am writing here because nobody has been able to solve the problem on the official forum.

I use WPShoPostPro + GP Premium + GeneratePress + Elementor Pro, when I click on load more it reloads me the same posts.

I tried to deactivate all plugins, update them, update WordPress, put the shortcode in a new page without Elementor but the problem is not solved.

Can you help me please?

Here the site http://yoghi.biz/nw/naturnews/

Thanks so much

Hi there,

this kinda thing can happen when there is more than one post query happening on the page. Above the WPSP list there is an Elementor displayed post and some Category buttons. Can you test the WPSP list without those elements ?

hmmm... can you test on normal WP editor page - ie, no Elementor template or editor involved so we can eliminate that as an issue.

Hi, same thing :-(

with or without classic editor, elementor, TinyMCE Advanced

The same installation here http://yoghi.biz/nwn/naturnews/ working, why ? It's very strange.

Can you check the Dashboard > Tools > Site Health and let us know if there are any important issues raised ?

Hi, same notices on both sites.

Would you like a credential ?

If you can send us an admin login we'll take a look.

Hi, i sent credentials.

thanks

Hi there,

Something must be interfering with the query on that page.

For example, go to http://yoghi.biz/nw/wpshopostpro/page/2 and you'll see that the same posts are being loaded on that page (which is where the load more button gets its posts from).

I'm not exactly sure why this would be happening - it could be one of your plugins, a custom function, or even something wrong on the server-side of things. The fact that it's working fine on the other site means it's something specific to this one problem site. You may want to make a staging site from it and unpick things one by one until the issue resolves itself.

After several tests I found the problem (bug? I don't know), WpSwhoPost-> More settings-Offset, if I set a value the problem happens, if I leave the field empty the problem doesn't happen.

The point is that I have to exclude the first post because it is already at the top, what can I do?

The second problem is the label of the load more, with this code, it works only the first time, if you then click the button the text returns to English.

add_filter ('gettext', function ($ text) {
if ('Load more' === $ text) {
return 'Load others';
}
if ('Loading ...' === $ text) {
back to 'Loading ...';
}

return $ text;
});

https://www.naturwaren.it/naturnews/

Hi Tom,

the code not working for me, i make a workaround with jQuery and css

jQuery('.wp-show-posts .wp-show-posts-inner:first').addClass('wpsp-first-post');

.wpsp-first-post{display:none !important}

What about the load more label problem ?

Thanks

Solved with this code

add_action('wp_enqueue_scripts','aa_naturwaren_script_style');

 add_filter( 'gettext', function( $text ) {
	
	if ( 'Load more' === $text ) {
        return 'Carica altri';
    } 
    if ( 'Load More' === $text ) {
        return 'Carica altri';
    }
    if ( 'Loading...' === $text ) {
        return 'Caricamento...';
    }
	
    return $text;
} );

Glad you got it sorted :)

This archived topic is closed to new replies.