0
votes
0answers
8 views

Custom post type pagination [duplicate]

I'm trying to get pagination for a custom post type. I don't know what's wrong with the code but it doesn't work. This is what I have done so far: <?php $query = new WP_Query( ...
0
votes
1answer
40 views

CPT Repeatable Fields + Undefined Index

I'm using this code here for repeating fields in a CPT (yes, I know of ACF and a few others), and have tried to add a third field. The field is currently displaying in the meta box, and is output on ...
0
votes
1answer
20 views

WordPress custom field images not getting inserted into array

I am using Wordpress to create a dynamic gallery using Bootstrap. I created a new custom field and then set it to 'images' and then assigned it to my post type. It then shows up in my post, I uploaded ...
0
votes
1answer
16 views

How to delete all trashed item in one-go

Currently I'm using wp-optimize to remove all trashed posts, trashed comments, draft posts However, this plugin sometimes not working and more important, it does not delete any trashed items from ...
0
votes
0answers
10 views

Let the user duplicate chunk of meta boxes

I have a CPT 'Product', that can be rented or sold multiple times over. Each time a transaction takes place, the admin would like to update some of the information (such as sale date, condition etc). ...
0
votes
2answers
25 views

Calling an custom field from theme option at the frontend

I am having trouble calling a field and displaying its content at the frontend from a custom theme option page. This is the code I am using to display my custom theme option at the backend ...
0
votes
1answer
17 views

Function not pulling image or text from custom post type

//Custom Post Type register_post_type('inf_main_feature', array( 'labels' => array( 'name' => 'Main Featured', 'singular_name' => 'Main Featured', ...
0
votes
2answers
35 views

Display title list of all post of current post type

I have a custom post type called press. I'm on the template single-press.php What I want to achieve is generate a list of the titles (with it's corresponding link to it) of all press custom post ...
2
votes
2answers
174 views

Why declare $post globally?

I'm new to Wordpress development and am seeing examples everywhere that have a line to declare the $post variable explicitly via: global $post; But I've tested my uses without that line and it ...
0
votes
0answers
17 views

Displaying Custom Post Type on Page with Same Title

I'm building a sports blog. I have a custom post type called conference. Each conference post contains HTML that is displays the team logos horizontally on my team custom posts as shown in the ...
0
votes
2answers
61 views

Displaying One Custom Post Type's Content On Single Post of Another Custom Post Type

I'm currently building a college football blog and I have 2 custom post types: conference and team. Each conference post type will be a horizontal list consisting of each teams' logo and will be ...
0
votes
1answer
37 views

How can I programmatically save data into custom fields that contain serialized data?

I purchased a theme from themeforest recently that has a custom post type. Here is a link to a page that's been created with the custom post type: ...
0
votes
1answer
86 views

How do I programmatically add items to a custom post type?

I have a custom post type to which I'd like to programmatically import data. I have followed these instructions and these, and I can easily do it for WP typical pages and posts. However, my custom ...
0
votes
0answers
36 views

Auto order posts of custom post type by title

I have a custom post type which has more than 50 posts. I want to reorder them alphabetically so that each time I post anything the system automatically reorders. Please don't suggest post order ...
0
votes
2answers
170 views

Filter second dropdown (tax) based on first dropdown (cpt)

I've been googling and attempting this for over a week now with no success. I have a few custom post types (books, films, music etc), and a custom taxonomy (location). On my frontpage, I have two ...
0
votes
0answers
38 views

Meta-Box to add multiple items one at a time and on publish save all

My example custom content type is for recipes. There will be a meta-box for ingredients. In this meta-box there will be three attributes and a "add" button. Name Measurements Notes Add Button My ...
0
votes
1answer
58 views

Values inside a custom field to determine which category posts to display

I am facing a little problem whilst trying to display posts, from certain categories, on the front end. I've created a custom field whose key is 'related_categories' and I've different categories with ...
0
votes
1answer
44 views

2 wordpress site same database

I have twoo websites on worpdress platform: http://fian.ro/ http://nuovafattoria.ro/ On the server there are 2 different folders with same files, same config but one of them has: ...
0
votes
0answers
24 views

Custom Search not working

Can any Wordpress Guru figure out why my custom search form just reloads the page when submitted? I'm trying to create a custom search that uses two dropdowns only (no text input). The first ...
0
votes
1answer
89 views

Exclude Custom Post Type from shared Custom Taxonomy

I have a few custom post types and two of them are sharing a custom taxonomy. Is there a way to list the terms of that taxonomy for only one of the custom post types? At the moment I can get a list ...
0
votes
0answers
39 views

Cron Job to Delete over 30 days old post from post type

This is my first time creating a WP cron job and I would like to have someone else review it for mistakes. I wrote this cron job to delete temporary wishlists that are over 30 days old. The wishlists ...
0
votes
0answers
19 views

Add a excerpt to a custom WYSIWYG

I have a secondary WYSIWG on my post and I am using it to display content under a thumbnail. I am trying to figure out how to limit the amount of words I can display with the code I am using to ...
0
votes
1answer
71 views

Show Custom Post Type taxonomy term that matches custom field

Not sure how well I can explain this but I will try. I have two Custom Post Types. One is "Locations" and one is "Members." I need to show only the members that belong to the location. "Locations" has ...
0
votes
1answer
85 views

“Allowed memory size” problem [closed]

I duplicated a wordpress website. On the new domain, the TYPES plugin causes big problems. I get several "Allowed memory size of ... bytes exhausted" error messages. They show up when I try to do the ...
0
votes
0answers
58 views

Wordpress Custom Post Type and sort by Tags

I am currently making a custom Wordpress theme, but so far I am stuck at this little problem. I have created this custom post type. And in that page (media.php) I want to be able to click on the tags, ...
0
votes
1answer
50 views

Adding custom tables to Wordpress

I have a database which has thousands of rows of data in each of the tables. I would like to migrate this database into a Wordpress website. I would like the user to be able to log in to Wordpress ...
0
votes
0answers
201 views

using ACF datepicker to filter posts on a page

i’m using a wp-query to display posts from a category on a custom post type page. it works fine, and I’ve been also abble to sort my posts depending of datepicker field called “date_debut”. my posts ...
0
votes
0answers
84 views

Complex menu structure with 6 custom post type hierarchy

We chosen to use Wordpress to this client but we have not work with a menu structure like this one on Wordpress. Those content types i what we have created as custom post type. Is listed below: ...
0
votes
1answer
68 views

Including all post id's of a custom post type into an array

For my single.php (products.php), I try to build a navigation via which the user can switch between products based on the meta key "price". I want to put all id's of the products post type into an ...
0
votes
0answers
28 views

Order posts by average

I am using advance custom fields and i have used the custom fields to create an average score. Now i want to order the posts by the average score I have tried to do it but it doesnt seem to work here ...
1
vote
1answer
37 views

Loading all files within a directory

I've made this little function which I'm wanting to call all the files within a directory. I don't think the glob() == false would work though. I'm new to this function so not aware of all ...
0
votes
2answers
64 views

Can I list a custom post type within another custom post type in the admin area?

I'm hoping someone can steer me in the right direction. I have a custom post type called 'locations'. I have another custom post type called 'testimonials'. What I'd really like to do is be able to ...
1
vote
2answers
179 views

Date archives for custom post type

I have seen many questions/posts regarding this, but have yet to find a decent solution. Basically I am trying to do what wp_get_archives does, but for a custom post type (personally I am unsure why ...
1
vote
0answers
54 views

Configuring a meta query with multiple post types that have the same relationship on a single page

I am creating a client portal were my clients can maintain their projects and leave feedback. I have two custom post types called "Clients" and "Projects" and they each pull information from one ...
0
votes
0answers
92 views

Display a query with multiple post types and same relationship on a single page

I am creating a client portal were my clients can maintain their projects and leave feedback in Wordpress. I have two custom post types called "Clients" and "Projects" and they each pull information ...
2
votes
0answers
188 views

Display a query with multiple post types and same relationship on a single page

I am creating a client portal were my clients can maintain their projects and leave feedback in Wordpress. I have two custom post types called "Clients" and "Projects" and they each pull information ...
0
votes
1answer
845 views

Let users upload image(s) to the post from front end

I want to enable logged in users (Wordpress) to submit posts from front end (among with other data). My form is working great, I add custom post meta data which I later display on custom post page. ...
0
votes
1answer
34 views

Not sure why this template for custom post type posts isn't displaying anything. What's missing?

<?php /** * Template Name: Movies */ ?> <?php get_header(); ?> <div id="container"> <div id="content"> <?php $type = 'movies'; $args=array( ...
0
votes
1answer
331 views

How to call Shortcode categories for custom post types?

Hi I'm trying to do something rather tricky in my Wordpress Theme I'm more of a designer front-end developer so its a bit of a guess work with php. Anyone have any ideas why this code only displays ...
0
votes
2answers
602 views

Inserting data into `post meta` table?

How would I be able to insert data into the post meta table? I know how querying and wpdb works but I have no idea how I can just insert it into the table. I have these two fields I want to insert ID ...
0
votes
1answer
200 views

Foreach loop returning more than one item when querying taxonomy

I am querying the taxonomy terms and then listing the posts that are under those terms. The taxonomy is basically a category for a custom post type, and the terms in it are the categories. I didn't ...
0
votes
1answer
112 views

Categories under custom post types doesn't show properly

I used a custom post type in my website: I added archive-{mytaxonomy}.php and also single-{mytaxonomy}.php. I also created a separate sidebar for my taxonomy and everything looks fine until I click ...
0
votes
0answers
78 views

How to use if statements to check and echo terms by hierarchy in a post?

I'm seeing a lot of posts on here with helpful snippets to resolve my problem, but nothing has been specific enough to help me - or I just don't understand how to make those solutions work for my ...
0
votes
1answer
15 views

Function to erase every post from a taxonomy

I'd like to have a piece of code that erase every single post from a taxonomy of a post type when triggered. How can I do it? Thank you.
0
votes
0answers
99 views

How to get duplicate array count with custom post type

After printing array I am getting output like this: Array ( [0] => WP_Post Object ( [ID] => 8 [post_author] => 1 [post_date] => 2014-01-31 ...
1
vote
1answer
459 views

Get custom post type list for every category shortcode

I am trying to make a shortcode to list all custom posts under the category they are under. Here is my code and I am no expert of coding but i thought that this would work. If someone can tell me what ...
0
votes
0answers
110 views

Selectbox Custom Post Type

I use a dropdownbox to show all custom types. On the archive page of the custom post type it works fine. If I put dropdownbox to another site, it doesn´t work anymore. The selectbox is empty. Any ...
0
votes
1answer
80 views

Compare Two Custom Post Types Using The Same Custom Taxonomy

I have two post types, courses and testimonials, sharing the same taxonomies. What I am looking to accomplish is to check whether a course is in the same category as a testimonial. Then display if it ...
0
votes
1answer
68 views

Posts without featured image using other post's featured image

I am using the following code (see bottom) to display a custom post called 'artists'. I am also using <?php if (has_post_thumbnail( $post->ID ) ) so I can set the background of a div using the ...
0
votes
0answers
24 views

custom processing for posts

Although I'm very well aware of PHP, but I'm kind of new to WordPress. So I created this WordPress site, but there's a bunch of posts that I want them to include some PHP and JavaScript and HTML ...