0
votes
3answers
28 views

Display different information of a custom post type

I'm developing a real estate site for a client and I'm struggling a bit with it. I created a custom post type called "Property". A property can be on sale and/or on rent. Two different menu items in ...
0
votes
0answers
22 views

How to e.preventDefault() on an admin post page for a submit() action?

Lately, I have had a problem with a seemeingly simple task of preventing a form submission an a post admin page in WP. In a nutshell: I created a meta box on an admin custom-post page that includes ...
0
votes
1answer
38 views

Howto: use existing post_meta as options for a different metabox (checkboxes or list)

I want to create an "Employee" Custom Post Type ("Add New Employee") wherein the employee may belong to one or many offices. The user needs to be able to add/edit/delete offices via a separate ...
0
votes
1answer
44 views

Notice: Undefined index: error and understanding wordpress

I am trying to create custom post types with wordpress 4. I followed a tutorial book called "Buildin Wordpress Themes From Scratch". I am on localhost so debug mode is on. When I try create a new ...
0
votes
0answers
24 views

How to add validation / error message while add/edit custom post

I am trying to add error message on custom field in custom post save action But my validation not working. Check my code below. add_action( 'save_post', 'save_event_meta_data' ); function ...
0
votes
0answers
21 views

Permalinks using event date (year & month) instead of publication date

The site http://www.bikefun.org is live and working, but the permalinks are not quite right. It is an event calendar site. Events are stored as a custom post type "bf_events", with dates stored as ...
0
votes
1answer
39 views

Custom Post Type meta oembed html output resulting in WSoD

For a homepage template I'm trying to query a custom post type with a couple custom meta boxes. They are a title, oembed text field, and text area. I've compiled the below code from various sources as ...
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
0answers
31 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
88 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
59 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
42 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
37 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
100 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
640 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
37 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
841 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
75 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
212 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
74 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
31 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
84 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
585 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
229 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
91 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
61 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
122 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
192 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
234 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
128 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
239 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
181 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
60 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
58 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
1k 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
188 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
123 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
88 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
554 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
158 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
115 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
857 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
147 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
1answer
349 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
269 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
176 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
213 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
2answers
151 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
124 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 ...