Hi CatchThemes, thanks for your free themes.
I've been scratching my head a lot for a problem I encountered in
catchbase-featured-content.php.
What I am doing is using the Polylang multi-language plugin. This plugin simply adds a way to create pages or posts which are translations of each other.
The problem is, I've currently set the catchbase slideshow and featured-content to show in frontpage only (which is a static page, and has a sibiling translated page).
Now, while the slideshow will show both in the original and in the translated version of the frontpage, the featured content does not.
Looking at the code in
catchbase-featured-content.php I could find that this condition is still satisfied in the translated version of the page:
if ( $enablecontent == 'entire-site' || ( ( is_front_page() || ( is_home() && $page_for_posts != $page_id ) ) && $enablecontent == 'homepage' ) ) { // create featured content HTML wrapper }
so I think it's not a problem with the translated page's URL not being recognized as front-page.
But going down below, in
catchbase_page_content function, the actual WP-Query fails to return the featured content:
if ( !empty( $page_list ) && $number_of_page > 0 ) {
$get_featured_posts = new WP_Query( array(
'posts_per_page' => $number_of_page,
'post_type' => 'page',
'post__in' => $page_list,
'orderby' => 'post__in'
));
// $get_featured_posts->have_posts() returns false in the translated page
// while ( $get_featured_posts->have_posts() ) ...
// loop for creating and showing featured content HTML..
}
Specifically, have_posts() returns false
only in the translated version of the page, and I could not find a reason for this.
I also took a look at
catchbase-featured-slider.php because they are similar and this code instead is able to return and show the slideshow content in both the translated and the origianl versions of the pages, but I could still not understand what is going wrong in catchbase-featured-content.php.
I really hope you can help me with this.. I don't know where else to look for.. maybe this could also turn out into a possible bug fix for Catch Base theme (provided it's a bug) ?
Thanks a lot!
Alfredo