Skip to main content
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
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
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 not deleted user 11135

For questions about the server-side programming language that the WordPress core, plugins and themes are written in. Questions about using PHP outside a WordPress context are off-topic but might be asked on Stack Overflow.

2 votes

How to show number of unpublished articles?

php $count_posts = wp_count_posts(); $draft_posts = $count_posts->draft; ?> …
Rob Vermeer's user avatar
  • 5,176
1 vote

Wordpress the_content() return only one image from a specific category

You are trying to get the ID via $post->ID, but that will only return the post ID of the first post. You can use global $post; before the args array, or much simpler replace $post->ID by the function …
Rob Vermeer's user avatar
  • 5,176
1 vote
Accepted

Adding a navigation page state to individual blog and portfolio pages

If it's in a menu you could use .current-menu-parent otherwise something like .current-post-parent or .current-page-parent I hope this is what you mean. Otherwise a link to your current site would he …
Rob Vermeer's user avatar
  • 5,176
2 votes
Accepted

Last class on last headline?

php $count++; endwhile; endif; ?> …
Rob Vermeer's user avatar
  • 5,176
1 vote
Accepted

Can a page contain php code?

You can't use PHP in the WordPress back-end editor. Maybe with a plugin you can, but not out of the box. The easiest solution for this is creating a shortcode. …
Rob Vermeer's user avatar
  • 5,176
8 votes

How to manually fix the WordPress gallery code using PHP in functions.php?

php remove_shortcode( 'gallery' ); add_shortcode( 'gallery' , 'my_own_gallary' ); function my_own_gallary($attr) { global $post; static $instance = 0; $instance++; // Allow plugins/themes …
Rob Vermeer's user avatar
  • 5,176
3 votes

PHP/Manual use of images? - 2 Questions

Function Reference/wp insert attachment $image_id = wp_insert_attachment( $attachment, $filename, $parent_post_id ); This function will return an image id which you can use for the featured image. …
Rob Vermeer's user avatar
  • 5,176
0 votes

Wordpress Ajax always returns a 404 error

You forgot to put your (wp) action in the form or jQuery ajax function. add <input type="hidden" name="action" value="myform"> to the form and it will hook on your ajax functions.
Rob Vermeer's user avatar
  • 5,176