Search Results
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 |
The method by which users find information on your WordPress site
0
votes
2
answers
205
views
Display an icon based on post type
I have a defined set of seven different post types and would like to display an icon for each one in the search results list. …
1
vote
Accepted
Display an icon based on post type
<?php
$post_type = get_post_type($post);
switch ($post_type) {
case "type1":
echo "<img src='label1.png'/>";
break;
case "type2":
echo "<img src=' …