As of today, Guest blogging is one of the best method to promote your business or blog online. There are lot of benefits for writing guest posts on great blogs which creates maximum exposure to your own blog as well as increases the authority of your blog in the market.

However, on the other side, as a blogger we should encourage guest blogging in our own blogs. People do expect a great blog to write a guest post and we should not be an exception here. There are lot of ways to encourage guest blogging in your own blog.

It actually creates a “source of content” for your blog and you could keep your blog up-to-date with lot of information. This increases the traffic as well as helps you in money making as a business…

A Writing Guest AuthorFurther, when more than one author writes for a blog – it creates more value to the readers because different people have different experiences and views.

Basically, encouraging guest bloggers in your own blog benefits you as well as the guest blogger – yes, mutually benefited.

In my recent article on 5 Reasons to allow guest post in your blog, i explained the methods to encourage guest blogging in your blog and one of the method is – showing the recent guest posts on the sidebar/footer bar.

  • Showing the recent guest articles in your blog grabs the attention of readers as well as those who are looking to write guest articles.
  • This way, you could gain more guest authors to your blog naturally without much efforts.
  • Also, you could write guest post for my blog (check the Guest post guidelines here) to mutually benefit.

Okay, lets get into the code.

The following PHP code displays the recent guest posts, all you need to copy and paste it wherever required.

<h6>Recent Guest Posts</h6>

<ul>
<?php query_posts(‘author=-1&showposts=5’); ?>
<?php while (have_posts()) : the_post(); ?>
<li>
<a href=”<?php the_permalink() ?>” title=”<?php the_title(); ?>”><?php the_title(); ?></a>

</li>
<?php endwhile;?>
</ul>

Add this to sidebar.php – if you want to show it on the sidebar or add this code to footer.php – if you want to show it on the footer (like me – check below).

The API query_posts() takes the argument “author” and we are using it to exclude the admin (that is you the owner of blog). Now query_posts() gives the list of recent posts which are not written by you the admin – hence the output is list of blog posts written by guest authors.

In this code snippet, my author ID is ‘1’ and I excluded myself using ‘-1’.

  • Example: If your author ID is 10, you could exclude your blog posts using query_posts(‘author=-10&showposts=5’).

Similarly, if your blog has multiple admin authors, you could exclude multiple authors by separating the list with ‘comma’.

  • Example: query_posts(‘author=-1,-10,-230,-22&showposts=5’);

This example excludes the authors 1, 10, 230, 22 and shows the blog posts written by other authors.

Also, you could vary the ‘showposts’ variable to control the number of blog posts to show – in this example i have requested the recent 5 guest posts.

Hope it is clearly explained, let me know if you have any doubts in using this code snippet.

Do this useful ? Do you think this method encourages guest authors in your blog ?

image:jjpacres

2017-10-09T20:56:30+00:00

About the Author:

I love-to-code, passionate-to-write, an upcoming author, and WordPress enthusiast. Here at BlashO, I mostly share WordPress tips. Connect with me @Twitter.

Leave A Comment