Tagged Questions
1
vote
2answers
39 views
How to write: $wpdb->update having WHERE NOT value pair in the array
I need to update all meta keys in the postmeta table that have a value other than 0, to the value of 0.
I tried this.. no love (though I cannot figure out why....):
$status = $wpdb->query("UPDATE ...
0
votes
1answer
28 views
Adding Category Argument into an Array for WordPress Query
I'm new to customizing WordPress and am looking to query an array of posts within a certain category. I have a display that's showing an array of all posts from the site:
$arguments = array(
...
0
votes
1answer
62 views
Exclude posts based on an array
I'm using a custom meta box to output a list of post IDs within a particular post type ("Publications" in this example). Is there a way I can output this array into a custom loop to only show posts ...
2
votes
3answers
363 views
Reversing the order of posts AFTER the query is performed
I'm am displaying the last 5 posts of a custom post type 'show'.
This gives me the latest post first.
<?php
$args = array(
'post_type' => 'show',
'posts_per_page' => 5,
'order' ...
0
votes
2answers
403 views
Wordpress loop: Display <div> if posts exist
In a single post template I am trying to output some header text in a <div> and display links to related posts in a <ul> if related posts exist (based on tags). If there are no posts, ...
0
votes
1answer
338 views
How to include post count in this “get_tags” snippet
Can anyone tell me how I can show a post count in this code snippet?
<?php $tags = get_tags();
if ($tags) {
foreach ($tags as $tag) {
echo '<li><a href="' . get_tag_link( ...