Tagged Questions
-1
votes
1answer
33 views
Eliminate duplicates in a foreach loop [closed]
I've created a filter for my search results that allows people to filter user searches based on their State from their profile. The problem I am having is that there are duplicate states showing in ...
0
votes
1answer
243 views
Why use foreach to get attachment_id if numberposts is equal to 1?
I needed to pass an image to a Pinterest plugin in posts without a Featured Image so I wrote a little function to get the id of the first picture in a post. This code is in the loop-single.php where ...
-1
votes
2answers
194 views
Different Output for “Every Other” Foreach Statement?
I'm currently using the following code in order to get subcategories in a category page and getting the posts foreach subcategory. In the part where it echos "span-12" (line 14) i want it to echo ...
2
votes
1answer
403 views
Advanced Custom Fields - Storing array value for further usage
This might might be more of a PHP question - but does deal with a WordPress plugin, Advanced Custom Fields
I am using a global select option to store a specific Location (custom post type) as the ...
1
vote
2answers
285 views
Make Selected Mutiselect Items “selected”
I'm developing a theme settings panel for a new wordpress theme that have an option to exclude categories from being shown in the loop. I managed to get the main functionality to work, using a ...
0
votes
2answers
698 views
Using a loop to display terms associated with a post
I'm using a custom post type and custom taxonomies, and using the following to display the terms of the taxonomies on the post page:
the_terms( $post->ID, 'taxname', 'beforetext', ', ');
Is ...