WordPress related posts plugin without see

For this you can use the file, you can find a lot of WordPress plugins related posts on the blog. If you want to keep your Wordpress blog a lot, try not to use the plugin WordPress plugin related posts plugin without showing the first step you can take to avoid it. So here is how to display Wordpress trying to write this post without the use of the related posts plugin. You can see how!

Wordpress related posts plugin without displaying

There are two ways that you can show the Wordpress plugin related post without it. One tag and the other is to use categories looks got here using the. tag to display the related posts plugin without WordPress.

1. create a new page in the WordPress theme directory. Name and related post.php past the following code and save the file in.

<>
See: http://codex.wordpress.org/Function_Reference/wp_get_post_tags
//Get an array of the current post, this function is assigned to the tag we use
$ Tags (ID-> $ post); wp_get_post_tags =
If ($ tags) {
$ First_tag = $ tags [0] term_id;-//we > enter the only first tag id
//Query_posts on the argument: http://codex.wordpress.org/Function_Reference/query_posts
$ Args array (=
'tag__in' = > array($first_tag),
' Post__not_in ' = > array (ID-> $ post) > rename
' Showposts ' = 4,//number of related posts > rename. If you want to change.
' Ignore_sticky_posts ' = > 1//if you want to exclude sticky posts
);
//Query_posts, WP_Query, the same arguments
$ Related_query = new WP_Query ($ args);

-If ($ related_query > have_posts ()) {
?>

Related posts


    <>
    While (have_posts ()): the_post (); – > $ related_query-> $ related_query
    ?>


  • ” >

  • <>
    endwhile;
    ?>


wp_reset_query(); //If you want to reset the loop: http://codex.wordpress.org/Function_Reference/wp_reset_query
}
?>

2. now you need to find where the post without the plugin WordPress-specific display. you can easily find this code to single.php file or content single.php or in the file content.php . Add the following line after the code.

Now it's your job to save! Please let us know if you do not work or work. We would be happy to hear.

Category: WordPress | Tags: WordPress, WordPress tips | Permalink

Mostofa Camille currently in Bangladesh and a passion for technology and a master's degree in writing tips in the pursuit of a 21 year old EEE students, he owns and runs Techwev, an online tech blog and update it.


View the original article here

Comments