Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author horike

    (@horike)

    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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode’ is closed to new replies.