Tagged Questions
0
votes
0answers
39 views
Retrieve post data via WPDB class
I'm trying to figure out doing a custom query using the $wpdb Object.
I have custom type posts, event_posts, that have meta data, images, as well as event dates which are input in the post with the ...
0
votes
2answers
109 views
$wpdb returns no results with SELECT query on custom post type, works on default post type
EDIT: Adding more background info.
I've coded a plugin that adds a meta box to the post page. When the post is published, the plugin will generate a random ID for the post, and insert the random ID ...
0
votes
0answers
38 views
Filter content by custom field and category
Im trying to filter an Wordpress request with 2 parameters.
by a custom field (REGION) there are 6 regions
by categorie, there are n-categories with 1 value per post.
As result i would like to have ...
0
votes
1answer
59 views
Saving custom metabox data with a twist
I've got more than a few metaboxes being used with a custom post type and I'm running into an issue where my data is not being saved as expected.
Here is the relevant part of the code, and its within ...
2
votes
1answer
189 views
Get terms that contain posts that in turn belong to other terms?
So I have custom taxonomy called "shape" and another one called "color". If I want to get the list terms under shape that contain posts that are also present in terms under color, how do I do that?
...
1
vote
2answers
161 views
$wpdb: Counting posts corresponding to 3 terms in 3 different taxonomies
It's easier if I made an example:
I have a custom post type MYPOSTTYPE, with 3 taxonomies TAX_1, TAX_2 and TAX_3
If I have 3 terms: 'TERM_TAX_1' in TAX_1, 'TERM_TAX_2' in TAX_2, and 'TERM_TAX_3' in ...
1
vote
1answer
162 views
Converting the_content string to an array?
I have created a custom taxonomy, this taxonomy is dedicated to image attachments, when I upload my images $post->post_content returns a string like:
'[caption id="attachment_98" align="alignnone" ...
0
votes
4answers
625 views
Trying to display posts by authors in with specific user meta
Ok here's the solution:
<?php
$wp_user_search1 = new WP_User_Query( array(
'meta_key' => 'state' ,
'meta_value' => 'NM',
));
$listers1 = $wp_user_search1->get_results();
$lister_ids1 = ...
1
vote
1answer
235 views
using custom taxonomies on non wp table?
I'm building a program registration system that will have a complex data structure. There are programs (custom post type, CPT), teachers (CPT), registrations (custom table and meta table), payments ...
0
votes
1answer
369 views
$post not working working in AJAX plugin with custom post type
I am trying to create a plugin that can relate two posts to each other, and to do so I am trying to use AJAX, but I am having trouble getting the current posts ID using $post->ID.
I am trying to ...