Tagged Questions
0
votes
0answers
18 views
Post from one WordPress site to another
I have two sites running on WordPress. I have a form on one site that generates a custom post type, and I would like this custom post type to be posted to another WordPress site. How can I do this? Is ...
0
votes
1answer
27 views
Post content stays the same but permalink changes ?
This is really weird. I made a posttype ' mediagallery ' via the plugin Types fields.
I simply want to load the post content and switch the posts with a next & prev button in de sidebar.
The post ...
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
104 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
19 views
Listing custom post type items from a couple of custom taxonomies
I know I have asked a similar question in the recent past (Listing all custom post types using a specific term on the said term's template page, in groups), but in this case, the template is more ...
0
votes
0answers
11 views
Pagination doesn't work using custom query (GET), WP redirects to paged url [duplicate]
I am using the Better pagination via: http://sltaylor.co.uk/blog/better-wordpress-pagination/ and for some reason the pagination url gets redirected by Wordpress.
The pagination query should be:
...
0
votes
1answer
68 views
Query custom posts from custom taxonomy
I'm trying to do a custo slideshow, but I have problems with query the posts.
I have defined a custom post type "slider" and a custom taxonomy "slideshow":
custom post type:
function ...
0
votes
1answer
22 views
Custom Post type showing up in loop, regular posts are not showing up
Every one knows the basic WordPress loop, every one knows that if you want just posts in a loop you put query_posts("post_type=post"); BEFORE the loop. which I have done.
The problem is I have a ...
0
votes
1answer
57 views
All in one calendar custom post type query doesnt work as expected
I did a custom post query for AIO Events Calendar, as described here: All in One Calendar Plugin Custom Post Type Query
But it doesnt work.
<?php echo esc_html( $event->cost ) ?>
returns ...
0
votes
2answers
115 views
Query custom post type based on post id and custom field value
There might be an answer here somewhere, but I'm unable to find it, or recognize it if I did. Here's the situation:
I have a custom post type, 'region', that displays on single-region.php. Region ...
0
votes
1answer
138 views
query posts and custom post type with meta key
I'm trying to query all-in-one-event-calendar's custom post type ai1ec_event and normal wordpress posts in a slider on my home page. That works pretty well.
Now I want to query only the posts with ...
0
votes
0answers
7 views
is_single query calling the wrong stylesheets? [duplicate]
Possible Duplicate:
is_singular won’t call my functions?
So I am trying to call different style sheets for each of my post types single page.
Here is the code I am using in my header ...
1
vote
1answer
181 views
Get parse_query filter to return slug instead of id
After much headache in the last week I feel like my problem is almost solved. I have been attempting to customize the admin edit.php page of custom post types to display and sort/filter custom ...
0
votes
2answers
796 views
Listing custom post types on archive page with array
I'm just starting to wrap my head around custom post types and for some reason can't get any of the custom post types to display in the loop. I've found some queries online but none of them are in ...
1
vote
1answer
72 views
Add post_type to index.php
I search for an hour now without result. Does anyone can explain me how to show my custom post_type (dictionnaire) in the homepage (index.php). I use 'Easy post type' to add custom post types and I ...
0
votes
1answer
59 views
Show custom posts with a specific “custom TAXONOMY slug” on startpage
I am using this code to get all the custom post types shown on the startpage:
add_action('pre_get_posts','wpse57309_alter_front_page_query');
function wpse57309_alter_front_page_query( $query ){
...
1
vote
2answers
83 views
How to organise this data within WordPress
I have a dilemma in how the data in this scenario should be organised, as well as queried.
The main elements in the scenario are the following:
Competition
Team
Player
Each player plays for one ...
2
votes
1answer
220 views
Adding posts of custom type into the main feed
I'm having some trouble with a subject that seems to be pretty basic, so I'm starting to feel (a little, only a little) dumb :-)
Here's the thing: I want my main feed to include the posts and other ...
1
vote
1answer
503 views
Use get_post_types to query only custom posts types
I need to query only custom posts types - that is all post types in my WP install excluding posts and pages. I have used get_post_types to build a string of all custom post types which I want to ...
3
votes
2answers
511 views
Sort custom post type list table by display name of a user id stored as post meta value
I have a custom post type named domicile. Each post (domicile) has an owner (not the author). Owners are users with a custom role. I store the user id as a post meta value (dmb_owner) for the domicile ...
0
votes
1answer
167 views
show posts only on homepage but using custom post type and taxonomy for query posts via url
I would like to do the following:
I have a index.php file in which I query all posts from the existing post_types. Like the code below.
<?php if (is_home()); { ?>
<?php
global ...
0
votes
2answers
207 views
Include different loop templates in search query
I have differnet Custom Post Types in my blog. I also have custom templates for each of them like loop-{$cpt-name}.php
I would like to include different cpt templates dynamically in search results ...
1
vote
1answer
349 views
Sort posts based on multiple custom fields
I have a three custom fields
Meta Key → YOUR_PREFIX_newcar_body_type
Meta Key → YOUR_PREFIX_newcar_transmission_type
Meta Key → YOUR_PREFIX_newcar_variant
and I have to sort posts ...
1
vote
3answers
2k views
Custom Post Types, Page Templates and Pagination. Why do I get a 404 Error?
I have spent hours today on a maddening issue I was having with displaying a custom post type. Everything displayed beautifully, except the pagination simply would not work properly.
I have a ...
0
votes
1answer
44 views
Make (custom) post type accessible only by custom query
I am trying to make a web application based on wordpress.
This application needs some text data to process and then display to users. For that I use a custom post type. So far so good.
Problem is, I ...
2
votes
3answers
1k views
get attachments for all posts of particular post type
I'm making a widget that shows a set of images from recent custom posts. I want to run the following query:
SELECT p.*
FROM wp_posts p
WHERE post_type='attachment'
AND post_mime_type LIKE 'image%'
...
0
votes
1answer
168 views
How to retreive and display value from post type to another page using Advanced Custom Field plugin?
I use Advanced Custom Fields in a post type and I would like to display them in another page. In addition, I would filter them according to 3 categories (3 tabs), for this I used a select field. Here ...
0
votes
2answers
264 views
Get the most popular terms for a custom post type
I’ve hit another small rock in my current project!
I’m trying to list (and link) to the archive page for the top 4 most used terms for a custom post type. I have this;
...
0
votes
1answer
351 views
Is it possible to create a shortcode that will query a post based on taxonomies?
I am working on a site that will be listing a few hundred products and we wanted to be able to quickly/easily show specific products on a page based on taxonomies. I have been doing some research and ...
0
votes
1answer
128 views
How to grab data (titles, thumbnails and custom fields) from multiple posts to populate a new array efficiently?
I need to know the most efficient method to grab 3 pieces of data from from multiple posts:
Post title
Thumbnail
Custom Field
I am attempting to build a Google map of posts using data stored in WP ...
1
vote
2answers
86 views
Querying both pages and posts
I am building an "advent calendar" for a client and they are wanting a combination of specific pages and custom posts appearing on the front page, in a specific order.
Things that need to be ...
0
votes
1answer
111 views
Allow admin to determine the order of queries?
I have a custom query that I created to display the team members of a company, but my client has asked whether they can have control over the order in which each team member is displayed. Is this ...
0
votes
1answer
414 views
Changing WordPress sort order for returned child pages
I have a custom WP_Query that looks like this:
$this_page_id=$wp_query->post->ID;
$images = new WP_Query( array( 'post_type' => 'menu-item', 'post_parent' => $this_page_id ) );
My ...
0
votes
1answer
108 views
Wordpress search results
I have installed Job Manager and managed to filter the search to only display jobs (i.e. post_type = jobman_job) and it works ok however, when displaying the search results, it only shows the title - ...
0
votes
1answer
421 views
Posts 2 Posts: query connected — orderby problem
Using Posts 2 Posts plugin I've created 'piece', 'person' and 'collection' custom post types: any piece may be connected to person (with roles 'author', 'conductor' etc) and collection.
Now the ...
1
vote
2answers
2k views
How to use a custom post type as front page?
I would like to set a site's front page to be a single post from a custom post type. I have been able to alter the request for my front page to a Custom Post Type archive with the following code ...
0
votes
1answer
487 views
Get the ID of the latest post
Been all over looking for the best way to do this.
I want to get the ID of the latest post of a certain post_type.
How can I do this in the cheapest way possible (by cheapest I mean using the least ...
0
votes
1answer
101 views
Code in custom widget queries all posts, when it should only query the current post
I have a query in a custom widget (my first one!) which, if it's of custom post type book, retrieves the post ID. This then gets used in a WP_QUERY to retrieve data about the page.
This works ...
0
votes
1answer
407 views
Add custom post type to query
$saved = $wp_query; query_posts(array('tag__in' => $tag_array, 'showposts' => $args['posts_per_page']));
I need this to query standard posts and a custom post type called "property"
I can't ...
0
votes
2answers
143 views
custom post-type query just returns two posts
I'm making a custom activity calendar for a client here: http://arbeidshesten.com/aktivitetskalender/
The backend is a custom post type "aktiviteter", with custom fields for the date ("dato") and ...
0
votes
1answer
1k views
Query multiple taxonomy in Custom Post Type
Currently I use:
query_posts("post_type=listing");
to pull all entries of my custom post type.
But I have a taxonomy called status with the values of Available, Pending, Sold.
I only want to show ...
0
votes
1answer
89 views
Number of posts in the archive
How do I show 10 posts on the first page of the archive, and 20 on others (>1)?
My custom post type name is "apartments".
Cheers!
1
vote
2answers
2k views
Wordpress Orderby Numeric Value Not Working
I am trying to get all products from the wpsc-product post type and then display them by a custom meta field called release_date_year. However, it doesn't appear to be ordering my posts by this custom ...
0
votes
1answer
32 views
Is there a (preferable built-in) way to check what custom queries are used in a theme?
I've build a theme using custom post-types with queries like
$my_custom_post_type_query = new WP_Query( array( 'my_arg' => 'value' ));
Now I'm writing a plugin where I need to do something like
...
0
votes
1answer
410 views
Can I query posts by taxonomy conditionally based on post type?
I have a query based on multiple post_types and taxonomies that works well, however I would like to add a level of complexity and query a taxonomy only for a specific taxonomy.
This query works as ...
1
vote
2answers
580 views
Selecting New & Edit Page for Custom Post Types
I'm probably missing something unless it's really not possible, for some reason I can't get my function to only execute on the new and edit page of a custom post type (the new not being a problem):
...
2
votes
3answers
1k views
Custom Select Query with Custom Post Types
Have been trying to figure out the issue with this for the past hour, but hitting a wall. Basically I'm just trying to query my custom post type based on some custom date fields and then displaying ...
-1
votes
1answer
907 views
WP insert post PHP function dynamically generated Custom Fields
Further to my previous question WP insert post PHP function and Custom Fields
We have a working insert post function that can also send over custom fields without yet knowing the ID. Please see the ...
0
votes
1answer
620 views
Query of custom post types only shows first post
I have a loop to show my custom post type of 'case_studies'. It originally showed all posts until I wanted to just show 3 specific posts. The problem is that it only shows the first post in my list of ...
0
votes
1answer
413 views
Custom query for custom post_type
I need to display a list of current tasks. Each task has a custom post_type and a start date and end date.
Can someone tell me how to modify my query so it will pick up any tasks that have a start ...
