Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 54764

Posts are the core of WordPress. They store content, are categorized, and are expansible with meta. Posts are grouped by post type, and within their post type by taxonomy (though a taxonomy can span more than one post type).

0
votes
I believe you should be able to achieve this using the is_main_query function and the_content filter. The is_main_query checks if the current query is the main or secondary query in the loop. functi …
answered Jan 22 '17 by Tunji
0
votes
There's a trash post hook add_action( 'trash_post', 'my_func' ); function my_func( $postid ){ // We check if the global post type isn't ours and just return global $post_type; if ( $p …
answered Dec 23 '16 by Tunji
6
votes
Wordpress has a post_exists function that returns the post ID or 0 otherwise. So you can do if ( 0 === post_exists( $title ) ) { **YOUR_CODE_HERE** }
answered Dec 18 '16 by Tunji
0
votes
You can use wp_count_posts Example using code above: $count_posts = wp_count_posts('post'); if ( $count_posts ) { $published_posts = $count_posts->publish; } <a href="YOUR_LINK">YOUR TEXT <?ph …
answered Dec 30 '16 by Tunji
1
vote
Wordpress already generates class for each posts, you can use these classes using the post_class function. Note: The function can be used either within the loop or by passing the $post_id So you …
answered Dec 29 '16 by Tunji
1
vote
You can actually achieve this by using the save_post hook, you do need to add the post tile though as WordPress uses it to create the permalink for the post: add_action( 'save_post', 'wpse254636_save …
answered Jan 31 '17 by Tunji