WebberZone
Forum Replies Created
-
Forum: Plugins
In reply to: [Contextual Related Posts] Related posts based on other fieldPlease see this gist for a code you could potentially add to your theme’s functions.php
It’s for another plugin I author (Better Search) and uses a meta field and value.
https://gist.github.com/ajaydsouza/767215093a24bafb903a
You’ll need to test by changing bsearch_ to crp_ and use the appropriate fields for Yoast as you have above.
Forum: Plugins
In reply to: [WebberZone Top 10 — Popular Posts] working with WPMLI don’t have a solution right now. Any chance of having a staging site created where I can test the plugin and change settings etc.
If so, could you please contact me via https://webberzone.com/contact with the details?
All this does look perfectly fine to me. Assuming you get the same results if you select just post?
Only way to figure out what query is running is to install Query Monitor plugin and then see what query is run on your search results page.
Forum: Plugins
In reply to: [Contextual Related Posts] 500 error with php 5.6The first three lines remove the indexes and the next three create them
It definitely seems like it’s pulling out all the Event post types which is strange.
Can you post a screenshot of your settings page?
Forum: Plugins
In reply to: [WebberZone Top 10 — Popular Posts] Nothing showsI don’t see the tracking code getting added to the pages. Can you verify if you have
the_contentin your theme?If not, can you try adding this to your single.php file?
<?php echo tptn_add_viewed_count( ' ' ); ?>Forum: Plugins
In reply to: [WebberZone Top 10 — Popular Posts] working with WPMLThat is indeed a strange behaviour. I must confess I will need to do much more testing on this. My tests on a sample install (I don’t have a multi-ligual site) didn’t reveal anything weird since it did pull the right set of posts.
Is the default language of your site Dutch?
Does the PHP session cookie set if you use the code I showed above in the gist?
Also, I’d be curious to see what your finding is in terms of performance.
Forum: Plugins
In reply to: [Contextual Related Posts] 500 error with php 5.6Please make sure you back up your database before running the below.
Could you please delete the full text indexes again and run this in phpMyAdmin:
ALTER TABLE wp_posts DROP INDEX crp_related; ALTER TABLE wp_posts DROP INDEX crp_related_title; ALTER TABLE wp_posts DROP INDEX crp_related_content; ALTER TABLE wp_posts ADD FULLTEXT crp_related (post_title, post_content); ALTER TABLE wp_posts ADD FULLTEXT crp_related_title (post_title); ALTER TABLE wp_posts ADD FULLTEXT crp_related_content (post_content);You can find the related posts indices at the bottom of the Browse view of the table in phpMyAdmin.
You need to use the correct prefix i.e.
wp_for your table. Some plugins allow you to change it to something else.The function
crp_cache_deletecan be triggered to run automatically when a post is deleted.You might want to use the delete_post hook to automatically clear the cache: https://codex.ww.wp.xz.cn/Plugin_API/Action_Reference/delete_post
add_action( 'delete_post', 'crp_cache_delete', 10 );or this if the above doesn’t work.
add_action( 'admin_init', 'crp_trigger_clear_cache' ); function crp_trigger_clear_cache() { add_action( 'delete_post', 'crp_cache_delete', 10 ); }Forum: Plugins
In reply to: [Contextual Related Posts] 500 error with php 5.6Hi, it could potentially be the case of having a lot of posts where PHP is timing out.
The best solution in this aspect is to actually run the queries within phpMyAdmin.
The plugin isn’t designed to set any cookie. The tracking updates the DB directly.
It’s designed to bypass a cache since that’s the only way to get the tracking to work. I’m not sure having the code cached will get it to track. As usual, I’m happy to hear solutions to improve the plugin, particularly in performance areas.
However, in terms of performance, many users have reported this piece of code in the functions.php works because it doesn’t load the whole WordPress backend (probably that’s what sets the cookie)
The piece of code uses the tracker that initially existed with Top 10 (couple of versions back).
I will be bringing this back in a subsequent version since it actually has much better performance. It does have compatibility issues with non-typically WordPress installs, e.g. when users move the directories around, but works in almost all others.
There is definitely no link between GA and Top 10. GA is definitely a lot more reliable given it’s a full fledged analytics system
You can try this piece of code in your functions.php file of your theme.
Most likely not. This only tracks the search terms that a user enters directly into your site’s search engine not something from a search engine like Google