Conversation
supporthello, I’m using the plugin and came across a situation. I would put the related posts in one part of my post and not the end, creating a shortcode would help. this may be a possible improvement? thank you. https://wordpress.org/plugins/wp-simple-related-posts/
If you want to make a shortcode for [wp_simple_related_posts] , please add the code in functions.php below: add_shortcode( 'wp_simple_related_posts', 'wp_simple_related_posts_shortcode' ); function wp_simple_related_posts_shortcode() { global $simple_related_posts; if ( !class_exists('Simple_Related_Posts') ) return; return $simple_related_posts->get_reloated_posts(); }
Hi horike. I am getting the following error when I use the above code: Fatal error: Call to undefined method Simple_Related_Posts::get_reloated_posts() Can you help?
We are also trying to add the related posts on another place of the page instead of the end of the page but the example isn’t working. Looks like you have changed the plugin and moved a part to the class Simple_Related_Posts_Base. But when we do the following: $Simple_Related_Posts_Base = new Simple_Related_Posts_Base(); echo $Simple_Related_Posts_Base->get_reloated_posts(); Nothing is happening. Do you have any thoughts?
If you want to make a shortcode for [wp_simple_related_posts] , please add the code in functions.php below: add_shortcode( 'wp_simple_related_posts', 'wp_simple_related_posts_shortcode' ); function wp_simple_related_posts_shortcode() { global $simple_related_posts; if ( !class_exists('Simple_Related_Posts') ) return; return $simple_related_posts->get_reloated_posts(); }
Hi horike. I am getting the following error when I use the above code: Fatal error: Call to undefined method Simple_Related_Posts::get_reloated_posts() Can you help?
We are also trying to add the related posts on another place of the page instead of the end of the page but the example isn’t working. Looks like you have changed the plugin and moved a part to the class Simple_Related_Posts_Base. But when we do the following: $Simple_Related_Posts_Base = new Simple_Related_Posts_Base(); echo $Simple_Related_Posts_Base->get_reloated_posts(); Nothing is happening. Do you have any thoughts?