Title: Shortcode
Last modified: August 21, 2016

---

# Shortcode

 *  [rrabello](https://wordpress.org/support/users/rrabello/)
 * (@rrabello)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/shortcode-184/)
 * hello, 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/](https://wordpress.org/plugins/wp-simple-related-posts/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [horike](https://wordpress.org/support/users/horike/)
 * (@horike)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/shortcode-184/#post-5048623)
 * 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();
       }
       ```
   
 *  [Gal Hadad](https://wordpress.org/support/users/zekit/)
 * (@zekit)
 * [11 years ago](https://wordpress.org/support/topic/shortcode-184/#post-5048682)
 * 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?
 *  [bpanne](https://wordpress.org/support/users/bpanne/)
 * (@bpanne)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/shortcode-184/#post-5048683)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-simple-related-posts_ffffff.svg)
 * [WP Simple Related Posts](https://wordpress.org/plugins/wp-simple-related-posts/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-simple-related-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-simple-related-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-simple-related-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-simple-related-posts/reviews/)

 * 3 replies
 * 4 participants
 * Last reply from: [bpanne](https://wordpress.org/support/users/bpanne/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/shortcode-184/#post-5048683)
 * Status: not resolved