QueryPosts, as the WordPress Codex should be

The Codex is the WordPress Bible but I've always thought that it lacks functionality for to quickly document any function or hook needed to program.

If I had to choose the next Codex tool I know it would be something very similar to QueryPosts .

QueryPosts is a website that offers a predictive search (shows results as you type) of WordPress functions and, once you have identified the one you want, then, first, a list of the arguments that you can use, as well as the path where " call "to the function.

In that screen, in addition, you can click on the function name, and then have a very complete screen in which we describe the same, its uses and we are given up to the. Everything very visual, simple and usable.

Come on, what the Codex should have, do not you think?

Your own icons for custom input types • WordPress Help

One of the news that is most exciting about WordPress is the custom entry types and you have already experimented with them, it is a functionality with a great future that, when it is incorporated by of the theme designers will convert WordPress into everything you can imagine.

Now, if you have encouraged yourself to create your own custom entry types, you've probably missed a good icon library to use in them, and not to leave the ugly icon by default.

And if you do not remember how icons are added to your custom input types here you have the code and, below, an explanatory video, so you do not miss anything.

<? Php

add_action ( 'admin_head' 'cpt_icons' ) ;

function cpt_icons () {

?> [19659002] <style type = "text / css" media = "screen">

# menu-posts-POSTTYPE .wp-menu-image {

background : url ( <? Php bloginfo ( 'template_url' [19659007]) ?> / Images / TUICONO.png ) no-repeat 6px -17px ! Important ;

] }

# menu-posts-POSTTYPE: hover .wp-menu-image, # menu-posts-POSTTYPE.wp-has -current-submenu .wp-menu-image {

background-position : 6px 7px ! important ;


<? Php } ?>

"more" that break the template • WordPress Help

A curious thing happened to us recently in the blog network and that I share in case it ever happens to you, it's something I did not know could happen.

It turns out that suddenly the template of one of the blogs appeared unconfigured with the sidebar under the main content. Checking the theme code, still sure that we had not made any changes, there was no open tag or anything strange, so I went to the second step when there are problems: reviewing the code inserted in the posts.

And the only thing I found was that the tags 'more' were wrapped in 'divs' a very strange question, and that it had no logic unless the editor had used a desktop manager to insert them automatically and I would not have noticed, for example.

So you know, the 'more' alone, without company.

Popular posts without plugin

If you liked yesterday's trick for show related posts without plugin today's sure you're not disappointed either. What it does is show a list of your most popular posts based on the number of comments they have generated, which is a way to see the impact on readers of what you post as good or bad as any other.

There are several plugins that allow this kind of things but why use them if you can do it with a bit of code in your template ?. You just have to choose the place – usually the sidebar – where to put it and paste this hack :

< h3 > Posts more popular < ] / h3 >

< ul >

<? Php $ result ] = $ wpdb -> get_results ( "SELECT comment_count, ID, post_title FROM $ wpdb-> posts ORDER BY comment_count DESC LIMIT 0, 5" ]) ; // change this number to the number of posts you want to be displayed

foreach ( $ result [19659033] as $ post ) {

setup_postdata ( $ post ) ;

$ postid = $ post -> ID ;

$ title = $ post -> post_title ;

$ commentcount = ] $ post -> comment_count ;

if ( $ commentcount ! = 0 ) { ?>

< li > [19659008] < to href = " <? Php echo get_permalink ([19659032] $ postid ) ; ?> " title = " <? Php echo [19659020] $ title ?> ">

<? Php echo $ title ?> < / to > {[19659099] <? Php echo $ commentcount ?> } < / li >

<? php } } ?>

< / ul >


Related posts without plugin • WordPress Help

If you are one of those who like to remove plugins to use functions already available in WordPress this is a great hack that can offer you the functionality of related posts without using plugins like Related Posts or others.

You just have to add the following code to the part of the ' loop ' in which you want the related posts to be displayed (usually in single.php or index.php ):





5 [19659002] 6
















<? Php

// to put in the loop, it shows 5 post titles related to the first tag of the current post ]

$ tags = wp_get_post_tags ( $ post -> ID ) ;

if ( $ tags ) {

echo 'Post related ';

$ first_tag = $ tags [ 0 ] -> term_id ;

$ args = array (

'tag__in' = > ] array ( $ first_tag )

'post__not_in' = > ] array ( $ post -> ID )

'showposts' [19659032] = > 5

'caller_get_posts' = > 1

) ;

$ my_query = new WP_Query ( $ args ) ] [19659000] if ( $ my_query -> have_posts () [1 9459027] ) {

while ( $ my_query ->

) ) ) : : $ my_query -> the_post () ;

?> to href ; ] = " <? Php the_permalink () ?> " rel = "bookmark" title = "Permalink to <? php the_title_attribute () ; ? > "> <? Php the_title () ; ?> < / to ]> < / [19659108] p >

<? Php

endwhile ;




Post related to WordPress Related Posts • WordPress Help

Today I woke up wanting to make some changes to the blog and decided to install a plugin related posts although I'm from the idea of ​​installing few plugins, or at least the necessary ones I decided to see what I could do, after everything went well I decided to go through here to make a review and I hope it serves them.

Ya Guillermo a while ago had echo an entry on like having post related in your blog with the simple plugin tags, which is something similar.

To have related post or related entries I install the plugin WordPress Related Posts

Let's download the plugin upload it to the wordpress plugins folder, (by default wp-content / plugins), go to the admin panel, activate the plugin, go to "settings" "Or" options "(depending on the language of your wordPress) and we go to nfigurarlo.

Related Post title: We will put the title that will warn that the links below are going to be "related".

When No Related Posts , Dispaly: At this point we must choose between 3 options in which we must indicate what to do to the plugin in case of not finding related posts.

Option # 1 : Text not related post – (below I explain)

Option # 2 : Random Posts – if we choose this option, when the plugin does not find any related post it will select post to chance that they have no relationship. It is the option that I recommend choosing because you will always find something and there will be something "relevant".

Option # 3 : Most commented Posts – We will show you the posts more commented.

After having chosen any of the 3 options, we have:

No Related Post's Title or Text: Here we are going to write the text that is going to show in case you do not find any related post.

Continue configuring, in the box " Limit " we will indicate the number of related posts that we want to show the box in white and default will show us 10 post you choose the amount. 😉

Exclude (category IDs): Here, if you want to exclude any category among the related posts, enter the category id.

And finally, Other Setting ]:
Auto Insert Related Posts : this box must be marked so that the related posts appear, which, I suppose, will be so as not to have to modify the code of any file.

Related Posts for RSS : This option is disabled since I do not see much use, it serves to show post from the feed.

Display Comments Count: Activating this box will show us the number of comments have the related posts suggested by us.

Display Post Date: Activate the date on which the related posts were written.

And we conclude the plugin configuration, as you saw there are several options and several plugins to do the same , or something similar, that's why it's good to try to show more alternatives and not keep a single plugin.

NOTICE : this publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

Loading …

That may also help you: