Insert Related Post In The Middle Of Article With Shortcode

Programming tutorial – seegatesite will share about how to insert related post in the middle of article with shortcode. Plugin related post in middle article will created as wordpress shortcode, and then we itcan put the related post widget according to our will, either above post, below post or in the middle of post. The related post in the middle of article widget as shown below

how to insert related post in the middle of article wordpress
Related Post In The Middle Of Article

The advantages put related post plugin in the middle of article are

– Lowering bounce rate
– Further increase visitor’s interest to open another page of our site
– add the internal link
– Create more interesting blog design.

 Here are the steps to create plugin related post in the middle of article

1. Add code on the function.php in the theme

– Please add the code below

2. Then, add code at the style.css on your theme as below

Explanation :

You can change related post query_posts with another query like example below

– WordPress popular post query_posts

– WordPress latest post query_posts

We’ve finished creating a shortcode to display related post in wordpress article , for use that, please follow the instruction below

Put that code on your article. If you don’t want to edit the function.php and style.css code on your theme, you can use or download my plugin below :).

Related post in the middle of article download plugin

Thus my article on how to insert related post in the middle of article with shortcode, may be useful 🙂

The following two tabs change content below.
This site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.


 Add your comment
  1. Mas biar langsung otomatis muncul tanpa masukin shotcode gmna ?
    biasanyakan harus pakai kode php yg dimasukin ke bagian single.php mas
    tolong bantuannya mas

  2. Very Good information sir Thank you, sir it is possible in blogger platform please guide me how to implement in blogger..

  3. Sir Please Guide me how to add this code in blogger plot form

  4. Sumit Kumar Gogawat

    How to do this for blogspot blogger. Please make a tutorial on this also.

Leave a Comment

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.