0
votes
1answer
41 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
0answers
11 views

add_post_meta from front end form

I am trying to add new post and meta data from the front end. I have a form and a custom post type named 'parts'. Looking for the easiest way of adding meta box and passing a value from the front end ...
0
votes
0answers
51 views

Prevent Duplicate Instagram Posts using Instagram API

Below is the code I am using to fetch every hour (using WP CRON) Instagram posts using the Instagram API, but more often than not I am getting duplicate, triple, and even quadruple identical posts and ...
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
1answer
31 views

Display a post count from a custom metabox selection

I was wondering if this is possible. I have a custom post type call projects that displays a metabox with drop down menu. In that drop down menu I have a few choices listed, draft, open, pending, ...
0
votes
1answer
25 views

Replace title column in post list with post meta value

I have created custom post type called booking. It have a meta booking_first_name, booking_last_name, booking_email, booking_phone, booking_phone_contact. Currently, I succeeded displaying email, ...
0
votes
0answers
60 views

User Answerable Multiple-Choice Question in Post

I am creating a plugin that adds multiple choice questions to WordPress. I wish for several to be displayed in a single post in a manner such that users may select an answer and receive instant ...
0
votes
2answers
312 views

Create Array from custom post type to display a slider

I have created a custom post type in my wordpress theme dedicated to creating slides for a slider displayed on the homepage, It has a title, slide text and slide url and also featured image. I'm now ...
0
votes
1answer
28 views

Meta Box Only in CPT Edit Page, Not in Add New

I have a CTP named leads and have 2 metaboxes added to the CPT new/edit screen. I need to have one of them only in edit screen, not in add new. Played with the codes provided in couple of answers, ...
0
votes
0answers
462 views

Displaying Metabox value (custom post type taxonomy)

I have been stuck on this for days, reading articles and articles and nothing works. I am trying to display the value of my metabox on a template page. I successfully added the metabox, and I see ...
0
votes
1answer
60 views

Related posts meta_query CPT

i have two post type "Artists" and "Songs", in "Songs" i have a meta box with checkbox list of "Artists" names. i want to show related posts if any post have same value of post meta with artist ...
2
votes
2answers
186 views

Automatically adding meta data to posts or multiple query help

I run an events company whose website uses a custom post type system for posts (blog), events and tickets all stored as CPT's in the DB. On the guestlist (which counts 'ticket' custom posts if the ...
0
votes
1answer
71 views

Timetable of Custom Meta Data using Custom Post Type and Custom Taxonomy

Scenario: I have a custom post type with custom meta boxes. Each post should represent a row in my table i.e Activity 1 Jan, Activity 1 Feb and Activity 1 Mar I have a custom taxonomy of terms ...
0
votes
0answers
28 views

Cannot save post meta data as Administrator in Wordpress

I have an wordpress installation at yogazoga.com with several custom post types. When i try to add meta data to posts through admin panel it simply does not work. See the post at: ...
0
votes
0answers
80 views

Filter plugin posts by meta value

I am a WordPress beginner, but have a few years of software development experience. I have a WordPress plugin used to display custom data via a custom post type. The index page contains something ...
1
vote
2answers
363 views

Correctly delete posts with meta and attachments [duplicate]

I am having an overview of custom post types: http://www.citizen-science.at/wordpress/projekte/roadkill/ubersicht/ These have custom tax and also an attachment. In my overview I need to provide ...
0
votes
3answers
139 views

Show future events based on custom field AND order by date

I have a custom content type (event), within that type I have a custom date field, with the name: 'date'. In my template I am running the WP_Query to return a list of events. I would like to only get ...
0
votes
1answer
79 views

Compare 3 custom fields and sort by oldest

I am building a movie archive. For each movie I am filling out the release dates for 3 countries, they're stored as custom fields (added via Pods) Now, when listing the movies I would like to build ...
0
votes
1answer
59 views

Meta box with front-end styling

I have a specific Gallery post of products that I release at the start of every Monday on my website, which differs from my other Gallery posts. These types of Gallery post don't require the Authors ...
0
votes
0answers
99 views

Show/Hide Custom Meta Boxes using any plugin

How can I show and hide the custom meta fields created using Advanced Custom Fields plugin? I want to handle the publish and unpublish of the fields and values from the admin panel. Is there any ...
0
votes
3answers
141 views

How to Echo Metadata Value in Currency Format

I have a Custom Post Type with a Metabox and an input Text field for adding "Price" to the posts. Now I would like to display the input value which can be like 49 or 59 like 49.00 or 59.00 so far I ...
0
votes
2answers
165 views

Sanitaizing Select Optin For Custom Post Type Metabox in WP

Using WordPress 3.8.1, I have a Custom post Type called "Map" and it contains a Metadata which is a Select options element as: <label for="my_meta_box_select">Countries</label> <select ...
0
votes
2answers
124 views

Issue on Working with Metabox - Checkbox to enable Sale Items

Using WP 3.8.1, I have a Custom Post Type which is called "Sport" and it has a Metdabox - medata data as I do not need to set up online shopping but I world like to add Price of my products to any ...
0
votes
0answers
188 views

Wordpress Admin Panel Search posts with custom post meta values along with title

Trying to modify default admin search by including search by custom post type fields, Below is my code, function custom_search_query( $query ) { $custom_fields = array( // put all the meta ...
0
votes
2answers
150 views

Filter posts by tax (dropdown) and meta value

I'm having a page on which all my custom post types are displayed. I now need to add another to the existing ones: $args = array( 'post_type' => 'bkroadkill', 'post_status' => ...
0
votes
1answer
54 views

How to rewrite CPT-Permalinks the correct way (incorporating meta-box-data)?

Using the below hooks, I tried to rewrite the permalinks of my custom post type magazine_issue to be made of values of additional meta-fields I added to the edit screen. The problem with my actual ...
0
votes
1answer
51 views

Rich Custom Field for Custom Post type not saving

I am new to creating meta boxes and I am trying to create a custom field meta box that is connected to a custom post type which is created by WooTheme Sensei (Post type = lesson). I am trying to use ...
1
vote
1answer
936 views

update_post_meta() whenever custom post type is updated

I need the following functionality. Whenever my custom post type is updated or saved I need to overwrite certain custom post metas. I need to make sure this only affects posts of the post type ...
0
votes
0answers
166 views

Add auto increment value to custom meta

I have a custom meta "code" in my CPT. How can I make it so that it has a number that will auto increment every time the admin publishes a post? My solution is to add a table in the database that is ...
0
votes
1answer
113 views

Custom post type submenu sorted by specific meta_key & meta_value

I have a created a custom post type called "Events" using register_post_type. I am now trying to create a submenu within "Events" that will only show events sorted by a specific meta_key and ...
0
votes
1answer
87 views

delete_post_meta() for whole CPT / multiple posts?

I'm cleaning up a theme and one of Custom Post Types has some odd, long gone custom fields. I want to delete them, unfortunately delete_post_meta() takes post->ID for an argument, while I want to ...
1
vote
2answers
468 views

How to keep a check box in custom meta box for custom post type checked by default for add new post?

In my custom plugin, I have a custom post type and have a custom meta box for it. I have few fields in it, one of it is a check box. I want this check box to be checked by default when I go for a add ...
1
vote
2answers
143 views

Custom Post Types. Are there any disadvantages/advantages in using a plugin to develop them?

There are a few plugins which can assist you in building your CPT's, and these can usually handle your taxonomies and sometimes postmeta also. Some even take it further than that. I know that as with ...
0
votes
1answer
2k views

How to add multiple featured image in meta box in post editor?

I would like to add multiple featured image in meta box in post editor area apart from default available featured image. I have added the meta box but i have no idea on adding the featured image ...
0
votes
1answer
103 views

How to retrive Custom Post Type Meta Fields in Custom WP_Query

Can some one let me know How I can render the Custom Post Type Meta Fields (Meta-boxes). I have a Custom Post Type Called "News" and I successfully added a Metabox to my Custom Post Type called "News ...
2
votes
1answer
733 views

Get all posts from custom post type and insert in select input as metabox

I would like to know if its possible to do something like this. I have Slider custom post type and Services custom post type. For slider posts I have created a metabox for URL value to display next ...
0
votes
1answer
133 views

How to get specific post meta by title or id

I have register bellow custom post type in function.php and I am using Advanced Custom Fields. Using advance custom field type I have added one image field and assigned to my Release custom post type. ...
0
votes
0answers
149 views

Filter post_meta for custom post types in Genesis 2.0

Working with Genesis 2.0: I have various Custom Post types declared, and I want to display as post meta information: - in normal post: "filed under: category1, category2..." - in the custom post ...
0
votes
1answer
301 views

Cannot Save MetaBox Data in Custom Post Type

I've been working on this issue for quite a while and am truly stumped. Below is all of the code for my custom post type: /* Services Post Type */ function services_post_type() { $labels = array( ...
0
votes
1answer
216 views

Can't sort order of wp_query with 2 meta keys

I'm trying to display custom post types by excluding the sold ones but also by displaying them in alphabetical order from the county meta_key. I'm trying to use pre_get_posts but I'm not sure that ...
0
votes
1answer
158 views

delete duplicate meta_value with same post_id

I've trying to cut down on the time to query a custom post type. After looking at the database and the wp_postmeta table, for some reason, there is some duplicate meta values for the same post_id and ...
0
votes
3answers
199 views

Using preg_replace to filter custom textarea

I am developing a custom post type, which, among others includes the possibility of sending an email from within the post editor. The email body textarea is populated through a custom settings page ...
0
votes
0answers
48 views

Displaying additional meta from a custom post type on the page?

I have added the custom field which displays in the custom post type "portfolio" just fine. // Add more custom field function woo_metaboxes_add($woo_metaboxes) { // Check for post type = ...
0
votes
2answers
137 views

HM CMB: Post Select Field for CPT ID

'm using human made's custom meta boxes framework (https://github.com/humanmade/Custom-Meta-Boxes). Using the post select: array( 'id' => 'example-field-post-select', 'name' ...
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
0answers
142 views

Repeating Posts Plugin Tweak

I am attempting to Repeat Posts (ie. publishing them multiple times) and found the plugin repeating-posts. However, I need to tweak it so that when I have it scheduled to repeat, it also repeats the ...
0
votes
0answers
122 views

One-time bulk MySQL copy post_date values to Advanced Custom Field (date field)

Disclaimer First of all let me say this is probably mostly MySQL related and unfortunately I'm nearly a total newbie on database language and commands. The problem Situation is a site running ...
0
votes
3answers
444 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 ...
0
votes
1answer
100 views

Search CPT Title AND Meta

I currently have a CPT I would like to search, the catch is I also need to be able to search the meta data for the CPT. I have the following code that currently searches the meta value needed but I ...
0
votes
1answer
83 views

Change the contents of a dropdown through the admin panel?

I have a custom post type "Events". In Events, I have a custom field for "Place" which is a dropdown list. Is there a way to edit the contents of the dropdown list through the admin panel or is ...