0
votes
1answer
41 views

How to create content automatically when a post is published?

Goal: Ability to automatically create content in WordPress posts/pages. Goal Details: When a post is created/published, it will automatically create or configure content based on the base data inputs ...
0
votes
0answers
203 views

get posts with hierarchy and all post meta

I created a custom post type to act as a Family Tree. There are currently 40+ post-meta fields that collect all of the important information. Wordpress's built in "parent" function is used to assign ...
0
votes
3answers
440 views

Get only used meta_values

this is how I'm getting the meta values: $apart_locations = $wpdb->get_col( "SELECT meta_value FROM $wpdb->postmeta WHERE meta_key = 'postal_location' ORDER BY meta_value ASC" ); This is how ...
1
vote
1answer
227 views

get_posts in meta box dropdown not showing latest posts

I’ve got a metabox I set up using WPAlchemy that allows authors to add a link to an associated post. It’s been working fine for months but now for some reason the dropdown with the appropriate posts ...
1
vote
1answer
448 views

If meta key exists in get posts function otherwise create it

The following code fetches posts with the meta key home telephone numbers. $metas = ''; $args = array( 'numberposts' => 1, 'post_type' => 'electors', 'orderby' => ...
0
votes
3answers
79 views

Is it possible to retrieve a post and its metadata at the same time?

I usually use two steps to retreive a list of posts and the associated metadata: call get_posts(or a custom WP_Query), and then loop through each post returned and retrieve each posts metadata one by ...
0
votes
1answer
380 views

Remove posts from query for events whose start date has passed

The query below works as expected, showing cpt event ordered by meta_value, what I haven't figured out yet is how to remove posts for past events or events which have started. The start date for ...
2
votes
1answer
2k views

meta_query: using BETWEEN with floats and/or casting to DECIMAL

Each post has a lat/lng value attached to it via postmeta. I'm trying to grab all posts within a bounding lat/lng value. Here's the get_posts query: $posts = get_posts(array( 'posts_per_page' ...