WPML
Status
Resolved
Reported for
WPML Multilingual CMS 3.6.0
Related plugin/theme
Blog Manager

Overview of the issue

Clicking the Load more button when using the secondary language on the front-end, displays a message that there are no more posts found.

Initial list with the Load more button. A message stating that there are no more posts found.
initial-list-with-load-more-button no-more-posts-found-message

Workaround

To resolve this issue you need to find and replace some code. Find the directories of the files you need to edit along with the code snippets to replace.

Directory:
wp-content/plugins/otw-blog-manager/skeleton/components/widget_pagination.php Find: $ajaxURL = admin_url( 'admin-ajax.php?action=get_posts&post_id='. $listID .'&nonce='. $uniqueHash .'&page='. $page ); Replace with: $ajaxURL = admin_url( 'admin-ajax.php?action=get_posts&list_id='. $listID .'&nonce='. $uniqueHash .'&page='. $page );

Directory:
wp-content/plugins/otw-blog-manager/include/otw_components/otw_functions/otw_functions.php Find: if( function_exists( 'icl_get_languages' ) ){ Replace with: if( did_action( 'wpml_loaded' ) ){

Directory:
wp-content/plugins/otw-blog-manager/skeleton/timeline.php Find: $ajaxURL = admin_url( 'admin-ajax.php?action=get_posts&post_id='. $listID .'&nonce='. $uniqueHash .'&page='. $page ); Replace with: $ajaxURL = admin_url( 'admin-ajax.php?action=get_posts&list_id='. $listID .'&nonce='. $uniqueHash .'&page='. $page );

Directory:
wp-content/plugins/otw-blog-manager/otw_blog_manager.php Find: $otw_bm_options = $this->otwBMQuery->getItemById( $_GET['post_id'] ); Replace with: $otw_bm_options = $this->otwBMQuery->getItemById( $_GET['list_id'] );

Directory:
wp-content/plugins/otw-blog-manager/skeleton/components/pagination.php Find: $ajaxURL = admin_url( 'admin-ajax.php?action=get_posts&post_id='. $listID .'&nonce='. $uniqueHash .'&page='. $page ); Replace with: $ajaxURL = admin_url( 'admin-ajax.php?action=get_posts&list_id='. $listID .'&nonce='. $uniqueHash .'&page='. $page );

Directory:
wp-content/plugins/otw-blog-manager/skeleton/components/pagination.php Find: $ajaxURL = admin_url( 'admin-ajax.php?action=get_posts&post_id='. $listID .'&nonce='. $uniqueHash .'&page='. $page ); Replace with: $ajaxURL = admin_url( 'admin-ajax.php?action=get_posts&list_id='. $listID .'&nonce='. $uniqueHash .'&page='. $page );

Now, you should be able to load more posts from the secondary language list, as shown in the following image. more-post-loaded-in-secondary-language

All known issues →