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 93195

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.

0
votes
1answer
I have the following custom page template filenames: template-about-1.php template-about-2.php template-home-1.php template-home-2.php I have this function to get_page_templates: function …
asked Apr 29 '16 by cpcdev
0
votes
1answer
, but use a conditional statement to compare the categories. The following code is not working with is_category. What am I doing wrong? <?php $args = array( 'post_type' => 'slides … = wp_get_attachment_image_src($image_id,’thumbnail’, true); $counter++; ?> <li> <div> <?php if (is_category(7)) { echo 'yes'; } else { echo 'no …
asked Jun 21 '16 by cpcdev
1
vote
Turns out what I needed is to use "in_category" NOT "is_category". Here is the solution: <?php if (in_category(7)) { echo 'yes'; } else { echo 'no'; } ?> …
answered Jun 22 '16 by cpcdev
1
vote
Figured it out after thinking it through.. if (stripos(strtolower($template_filename), 'home') !== false) { $results[] = $template_name; }
answered Apr 29 '16 by cpcdev