0
votes
1answer
26 views

one get_posts to return a number of custom posts for each meta value

I have setup a custom post 'product' with a custom field cf_type. I wish to have one get_posts that will return 20 total products, 10 products with cf_type: fog and 10 with cf_type: gof. Is that ...
0
votes
0answers
88 views

WordPress Page Template to Display Page Title, Custom Field, and Date

I'm currently attempting to create a page template that will display all posts by the current logged in user, a particular custom field from those posts (i.e., Item Status), and the dates those posts ...
0
votes
0answers
93 views

Wordpress sort custom field values in alphabetical order

I am using WordPress Custom Content Type Manager to build a Literary Agency website. The page I'm stuck on is the Authors page which displays thumbnails of all the books related to the author. The ...
0
votes
2answers
549 views

use get_posts to get custom field data, but in one array

I've run a get_posts query in WordPress and need to pull a pair of custom fields and get all of them into one array. The get_posts query provides an array of posts, but when I use foreach to access ...
0
votes
2answers
590 views

get_post_custom_values not working

I have made a custom template to show the posts in "Products" category in a single page.I have some custom fields.I need to show the values of the custom fields in the page. I have used the ...
1
vote
1answer
274 views

Getting movie and serial on actor page

I'm building a cinema site, I came with a problem, let me explain: Movies- are stored in Post's Actors- are stored in Post Type - persoane ( taxonomy= lista) Serials - are stored in Post Type - ...
1
vote
1answer
240 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
2answers
234 views

Ordering posts by metadata

In my plugin, I use these instructions to obtain a list of posts: $args = array( 'numberposts' => -1, 'offset' => 0, 'meta_query' => array( array( ...
0
votes
1answer
391 views

Custom field to array?

I have a posts query that queries posts by ID but want to select those posts by enetering a custom field. Here is the query and where I want to put the custom field: $query_args = ...
1
vote
1answer
457 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
169 views

Delist entries in the_loop

I am trying to add a delisting feature to my WordPress network. Posts which are delisted would not appear in post lists, but would still be visible if accessed directly. I've written a plugin that ...
0
votes
2answers
126 views

get post id using custom filed value

I'm having custom field "prime" with values yes or no. I want to get the post id's with selected value "Yes".How can i get that. Thanks in advance
1
vote
2answers
3k views

Using get_posts with arguments found in meta keys

I am using get posts, but I need to refine the query based on posts where a certain meta_key has a certain value. Something like this <?php $reviews = ...
1
vote
1answer
214 views

get_posts that haven't been assigned a specific custom field

I'm trying to use get_posts() to pull articles that have not been assigned a specific custom field. For example (not working): $articles = get_posts(array( 'post_parent' => 0, 'post_type' ...
1
vote
1answer
6k views

Query Posts or Get Posts by custom fields, possible?

If I were to take a standard query post. <?php query_posts('post_type=payment'); while (have_posts()) : the_post();?> Only this time I would like to query the post by 2 custom fields that it ...