Skip to main content

All Questions

Tagged with
0 votes
1 answer
10 views

Custom fields empty after refreshing page

I have added some custom fields to the Gutenberg editor, the purpose is getting these custom fields loaded in the custom-post-type. Thats is all working, I was able to get the custom-fields in the ...
Brango's user avatar
  • 1
0 votes
0 answers
17 views

custom post type with metabox custom fields

how to make meta custom fields in custom post type name jobs_board_cpt , I am using boilerplate ? public function jobs_board_cpt() { $labels = array( 'name' => ...
Muhammad Ashfaq's user avatar
0 votes
1 answer
62 views

doesn't save custom meta box data wordpress

My WP doesn't save my meta box data. I see the metabox and the field, but the data doesn't saving. Somebody could help me? Thank you. This is the code: <?php // Function to add a metabox function ...
Tivan Cell's user avatar
0 votes
0 answers
193 views

How to consume external API from WordPress post editor and display the response data in the custom field?

I am developing a custom post type called "Team," where I will add some profiles of team members. I am using ACF for the custom field to add personal details of the members (I can also ...
Rousnay's user avatar
1 vote
0 answers
120 views

Saving multiple custom meta box fields

So, I have a custom metabox, with multiple fields on it, and the amount of boxes is variable (could be 3, could be a lot more, depending on order quantity number) I'm trying to write a save function ...
Mark Tabner's user avatar
0 votes
0 answers
118 views

How to add new Metadata options (Date, Author, etc.) for Posts?

I would like to know if it's possible and how to create new Metadata options (like Date, Author, etc.) to show about a Post. I tried using Advanced Custom Fields, but I can't seem to use the custom ...
Giacomo Simonin's user avatar
0 votes
1 answer
47 views

Custom Post Meta from custom metaboxes is randomly being deleted

For a while now I've been applying and updating some custom metaboxes that my company re-uses on different sites. (Not the same metaboxes, but the same methodology.) Essentially it allows for the '...
Tony Djukic's user avatar
  • 2,109
0 votes
0 answers
35 views

Preset custom fields

I'm creating a wordpress plugin which will create a custom post with custom fields like "time", "rating" etc whose will be fillable in admin. So far all tutorials I've seen only ...
user2437063's user avatar
1 vote
0 answers
51 views

Unsaved changes in metabox inputs not detected in the block editor

I have added a custom field to the regular WP post type and added a meta box to the post editor as below (it is just an example with trivial checkbox): add_action( 'add_meta_boxes', '...
user avatar
0 votes
0 answers
399 views

Making custom meta box required (with error message if not filled in) on Gutenberg

<input required name="myName" type="text" value="<?php echo $myValue; ?>" class="regular-text"> Does not produce an error message if the field is ...
Drewdavid's user avatar
  • 219
0 votes
0 answers
305 views

HTML for adding a meta box (basic text field) to page editor?

I am following this tutorial from to add a meta box to pages of a certain page template. Unfortunately the code omits the part on how to create the actual meta box on the page (the HTML). The code in ...
Drewdavid's user avatar
  • 219
0 votes
1 answer
50 views

Move the metaboxes to the very top of post editor

I have this function that creates a custom metabox (with the metabox .io plugin), i would like the metabox to stay on top just below the title field this is the code i am using function generator_api()...
Vincenzo Piromalli's user avatar
0 votes
1 answer
45 views

How to improve my non-unique metadata MySQL entries?

I'm working on a plugin for WooCommerce which uses a cpt called Restock. In a Restock post you can enter products ( id ) plus restock. The user can add as many product restock pairs as they want per ...
photogenic's user avatar
1 vote
0 answers
21 views

Visual editor issue by having multiple tiny mce editors in a CPT

I have a custom post type in which I have added multiple wysiwyg editors, when I click on visual, the content of the editor (button, text, title) get inside of the wysiwyg editor.. it's odd. It looks ...
DroidPress's user avatar
0 votes
1 answer
24 views

Set class if a meta value is set within post archive

I'm attempting to add a class to posts when the meta key 'checkbox' is clicked. Here's what I have: <?PHP $checkbox = get_post_meta($post->ID, 'checkbox', true); if (!empty($checkbox)){ $...
Camille Roney's user avatar

15 30 50 per page
1
2 3 4 5
23