No related posts showing (shortcode)
-
I placed the shortcode
[crp]
at the bottom of the blog sidebar, and also above the flag image on the page indicated here.I know your plugin is “alive” because browser dev tools are showing
<div id="crp_related"></div>
in the rendered HTML.Does it need time to build a list of related content in the db?
I installed the Query Monitor plugin but not seeing anything unusual…
The page I need help with: [log in to see the link]
-
What is the output you’re seeing with Query Monitor for the plugin’s query?
The related posts should work automatically
@ajay I went to the “All” window and copied those queries …
1 SELECT VERSION() + Health_Check_Site_Status->prepare_sql_data() Plugin: health-check 1 0.0003 2 SELECT name, val FROM hts_wfConfig WHERE autoload = 'yes' + wfConfig::loadAllOptions() Plugin: wordfence 270 0.0004 3 SELECT <code>name</code>, <code>value</code> FROM <code>hts_wfls_settings</code> WHERE <code>autoload</code> = 'yes' + WordfenceLS\S\Model_DB->_cached() Plugin: wordfence 19 0.0002 4 SELECT name, val, autoload FROM hts_wfConfig WHERE name = 'detectProxyRecommendation' + wfConfig::get() Plugin: wordfence 1 0.0002 5 SHOW FULL COLUMNS FROM <code>hts_wfBlocks7</code> + wfBlock::lockoutForIP() Plugin: wordfence 9 0.0046 6 + wfBlock::lockoutForIP() Plugin: wordfence 0 0.0006 7 SELECT name, val, autoload FROM hts_wfConfig WHERE name = 'scansEnabled_geoipSupport' + wfConfig::get() Plugin: wordfence 0 0.0001 8 SELECT name, val, autoload FROM hts_wfConfig WHERE name = 'wordfenceCentralConnected' + wfConfig::get() Plugin: wordfence 0 0.0001 9 SELECT name, val, autoload FROM hts_wfConfig WHERE name = 'needsGeoIPSync' + wfConfig::get() Plugin: wordfence 0 0.0002 10 SELECT name, val, autoload FROM hts_wfConfig WHERE name = 'detectProxyRecommendation' + wfConfig::get() Plugin: wordfence 1 0.0036 11 SELECT MAX(attackLogTime) FROM hts_wfHits do_action('plugins_loaded') Core 1 0.0002 12 SELECT *, CASE WHEN <code>type</code> = 3 THEN 0 WHEN <code>type</code> = 4 THEN 1 WHEN <code>type</code> = 7 THEN 2 WHEN <code>type</code> = 6 THEN 3 WHEN <code>type</code> = 5 THEN 4 WHEN <code>type</code> = 9 THEN 5 WHEN <code>type</code> = 8 THEN 6 WHEN <code>type</code> = 2 THEN 7 WHEN <code>type</code> = 1 THEN 8 ELSE 9999 END AS <code>typeSort</code>, CASE WHEN <code>type</code> = 3 THEN <code>parameters</code> WHEN <code>type</code> = 4 THEN <code>parameters</code> WHEN <code>type</code> = 1 THEN <code>IP</code> WHEN <code>type</code> = 9 THEN <code>IP</code> WHEN <code>type</code> = 5 THEN <code>IP</code> WHEN <code>type</code> = 6 THEN <code>IP</code> WHEN <code>type</code> = 7 THEN <code>IP</code> WHEN <code>type</code> = 2 THEN <code>IP</code> WHEN <code>type</code> = 8 THEN <code>IP</code> ELSE 9999 END AS <code>detailSort</code> FROM <code>hts_wfBlocks7</code> WHERE <code>type</code> IN (4) AND (<code>expiration</code> = 0 OR <code>expiration</code> > UNIX_TIMESTAMP()) ORDER BY <code>typeSort</code> ASC, <code>id</code> DESC + wfBlock::allBlocks() Plugin: wordfence 0 0.0006 13 SELECT *, CASE WHEN <code>type</code> = 3 THEN 0 WHEN <code>type</code> = 4 THEN 1 WHEN <code>type</code> = 7 THEN 2 WHEN <code>type</code> = 6 THEN 3 WHEN <code>type</code> = 5 THEN 4 WHEN <code>type</code> = 9 THEN 5 WHEN <code>type</code> = 8 THEN 6 WHEN <code>type</code> = 2 THEN 7 WHEN <code>type</code> = 1 THEN 8 ELSE 9999 END AS <code>typeSort</code>, CASE WHEN <code>type</code> = 3 THEN <code>parameters</code> WHEN <code>type</code> = 4 THEN <code>parameters</code> WHEN <code>type</code> = 1 THEN <code>IP</code> WHEN <code>type</code> = 9 THEN <code>IP</code> WHEN <code>type</code> = 5 THEN <code>IP</code> WHEN <code>type</code> = 6 THEN <code>IP</code> WHEN <code>type</code> = 7 THEN <code>IP</code> WHEN <code>type</code> = 2 THEN <code>IP</code> WHEN <code>type</code> = 8 THEN <code>IP</code> ELSE 9999 END AS <code>detailSort</code> FROM <code>hts_wfBlocks7</code> WHERE <code>type</code> IN (3) AND (<code>expiration</code> = 0 OR <code>expiration</code> > UNIX_TIMESTAMP()) ORDER BY <code>typeSort</code> ASC, <code>id</code> DESC + wfBlock::allBlocks() Plugin: wordfence 0 0.0003 14 + wfBlock::findIPBlock() Plugin: wordfence 0 0.0003 15 SHOW TABLES LIKE 'hts_yoast_seo_links' + WPSEO_Link_Table_Accessible::check_table() Plugin: wordpress-seo 1 0.0005 16 SHOW TABLES LIKE 'hts_yoast_seo_meta' + WPSEO_Meta_Table_Accessible::check_table() Plugin: wordpress-seo 1 0.0005 17 SELECT option_value FROM hts_options WHERE option_name = 'can_compress_scripts' LIMIT 1 + get_option() Core 1 0.0018 18 SELECT option_value FROM hts_options WHERE option_name = 'can_compress_scripts' LIMIT 1 + get_option() Core 1 0.0002 19 SELECT comment_approved, COUNT( * ) AS total FROM hts_comments GROUP BY comment_approved + get_comment_count() Core 0 0.0001 20 select val from hts_wfConfig where name='wordfence_chunked_adminNoticeQueue_header' + wfDB->querySingle() Plugin: wordfence 0 0.0002 21 select val from hts_wfConfig where name='adminNoticeQueue' + wfDB->querySingle() Plugin: wordfence 1 0.0001 22 select val from hts_wfConfig where name='wordfence_chunked_adminNoticeQueue_header' + wfDB->querySingle() Plugin: wordfence 0 0.0001 23 show variables like 'max_allowed_packet' + wfDB->querySingleRec() Plugin: wordfence 1 0.0006 24 select name from hts_wfConfig where name='adminNoticeQueue' + wfDB->querySingle() Plugin: wordfence 1 0.0001 25 SELECT name, val, autoload FROM hts_wfConfig WHERE name = 'detectProxyRecommendation' + wfConfig::get() Plugin: wordfence 1 0.0001 26 SELECT * FROM hts_wfNotifications WHERE <code>new</code> = 1 AND <code>ctime</code> > 0 ORDER BY <code>priority</code> ASC, <code>ctime</code> DESC + wfNotification::notifications() Plugin: wordfence 1 0.0001 27 SELECT COUNT(*) FROM ( SELECT 0 FROM hts_blc_links AS links JOIN hts_blc_instances AS instances ON links.link_id = instances.link_id WHERE ( instances.parser_type IN ('link', 'image', 'plaintext-url', 'youtube-iframe', 'metadata', 'url_field', 'acf') ) AND ( instances.container_type IN ('comment', 'post', 'page', 'dummy', 'wp_block', 'wpcf7_contact_form') ) AND ( ( broken = 1 ) ) AND ( (dismissed = 0) ) GROUP BY links.link_id) AS foo + blcLinkQuery->get_links() Plugin: broken-link-checker 1 0.0001 28 SELECT <code>name</code>, <code>value</code>, <code>autoload</code> FROM <code>hts_wfls_settings</code> WHERE <code>name</code> = 'recaptcha-test-mode' + WordfenceLS\S\Model_DB->get() Plugin: wordfence 0 0.0001 29 SELECT name, val, autoload FROM hts_wfConfig WHERE name = 'onboardingAttempt3' + wfConfig::get() Plugin: wordfence 1 0.0001 30 SELECT name, val, autoload FROM hts_wfConfig WHERE name = 'onboardingAttempt3' + wfConfig::get() Plugin: wordfence 1 0.0000 31 SELECT name, val, autoload FROM hts_wfConfig WHERE name = 'onboardingAttempt2' + wfConfig::get() Plugin: wordfence 1 0.0000 32 SELECT option_value FROM hts_options WHERE option_name = 'can_compress_scripts' LIMIT 1 + get_option()
Can you check that Cache is disabled in the settings page.
Then on the page where you’re supposed to see the related posts, in Query Monitor choose only the queries for the Contextual Related Posts component? There should be one in there with a “MATCH” clause
Of these two, both are disabled …
Cache posts only
Cache HTML output
now looking through Query Monitor stuff for “MATCH” …
@ajay no luck in Query Monitor.
This has been installed for a week and still tinkering. Management will eventually pull the plug.
I just checked that link again and I can see related posts there.
Yipes; in three different locations. I need only one instance of the shortcode.
Whatever tinkering I did that made this start working, I need to leave it as it is!
Thanks for your patience!
- The topic ‘No related posts showing (shortcode)’ is closed to new replies.