No results – current post id didn’t get populated
-
Hi keesiemeijer,
I’ve installed your plugin due to it seems it matches the requirements I have.
There’s the issue that no results are showed. I’ve tried different post types and implementation per shortcode, widget and sitewide with your functions.ini instructions.
All methods end up with no results:
*************************************************************** ** ** ** Related Posts by Taxonomy General Debug Information ** ** ** *************************************************************** Plugin Supports array ( 'widget' => true, 'shortcode' => true, 'shortcode_hide_empty' => false, 'widget_hide_empty' => true, 'cache' => false, 'display_cache_log' => false, 'wp_rest_api' => false, 'id_query' => false, 'lazy_loading' => false, 'debug' => true, ) ------------------------------------------- All post types found (public and private) post, page, attachment, revision, nav_menu_item, custom_css, customize_changeset, oembed_cache, user_request, wp_block, acf-field-group, acf-field, glossar, faq, news ------------------------------------------- All taxonomies found (public and private) category, post_tag, nav_menu, link_category, post_format ******************************************************** ** ** ** Related Posts by Taxonomy Debug: shortcode 1 ** ** ** ******************************************************** current post id: ------------------------------------------- terms found for current post: ------------------------------------------- taxonomies used for query: ------------------------------------------- terms used for query: ------------------------------------------- related post ids found: ------------------------------------------- shortcode args: array ( 'post_types' => 'post,page,glossar,faq,news', 'posts_per_page' => 5, 'order' => 'DESC', 'orderby' => 'post_date', 'fields' => '', 'include_terms' => '', 'exclude_terms' => '', 'include_parents' => false, 'include_children' => false, 'exclude_posts' => '', 'limit_posts' => -1, 'limit_month' => '', 'post_thumbnail' => false, 'public_only' => false, 'include_self' => false, 'meta_key' => '', 'meta_value' => '', 'meta_compare' => '', 'meta_type' => '', 'terms' => '', 'related' => NULL, 'limit_year' => '', 'post_id' => 817, 'taxonomies' => '', 'title' => 'Related Posts', 'format' => 'links', 'image_size' => 'thumbnail', 'gallery_format' => '', 'columns' => 3, 'caption' => 'post_title', 'link_caption' => false, 'show_date' => false, 'post_class' => '', 'before_shortcode' => '<div class="rpbt_shortcode">', 'after_shortcode' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>', 'type' => 'shortcode', ) ------------------------------------------- Related posts query arguments: ------------------------------------------- related posts query: ------------------------------------------- requested template: related-posts-links.php -------------------------------------------
The current post id shown by your debugger is not populated so that no matching can take place.
Weird is that the shortcode args array is showing this id.
Tests to hardcode the id in the shortcode with the ‘post_id’ argument also end ub with no results and a not populated current post id.
Background:
The 3 custom post types (glossar,faq,news) has been created using CPT UI.
1 of them should have 2 rpbt shortcodes to show 5 links for each of the other two types.
It’s a child theme of yootheme pro.It would be great if you have an idea about the root cause.
Best
Dennis
- The topic ‘No results – current post id didn’t get populated’ is closed to new replies.