Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
2 answers
899 views

How to activate "Description" metabox for menu item programmatically?

I'm creating custom wordpress theme. How can I enable "Description" metabox for menu items (on nav-menu page) by default programmatically?
Stanislau Ladutska's user avatar
0 votes
1 answer
42 views

Specific coditional usage [closed]

I have some trouble making work a conditional inside a Function. check this out: I'm using this function: function get_spec_1(){ $desc1 = get_post_meta( get_the_ID(), 'eco_mb_tp_1', true!= "" ); ...
Locke's user avatar
  • 17
0 votes
1 answer
3k views

Displaying Saved Meta Box Data in Drop Down with selected()

I have a custom meta-box for certain custom post types, and one of those fields in the meta-box is a drop down. I am providing the field correctly, saving the information, and even calling it ...
RCNeil's user avatar
  • 548
0 votes
1 answer
235 views

Post AND page parameter for WP function

Is there no post AND page parameter for WordPress functions? So would I have to create a custom post type to define post AND page? For example, add_meta_box( $id, $title, $callback, $post_type, $...
AAA's user avatar
  • 123
0 votes
2 answers
2k views

Meta-Boxes for CustomPostType cause PHP Errors and Notices in "Add New" view

I have a custom-post-type named wr_events. I have quite a lot of meta-boxes in this post-type. The post-type and the meta-boxes itself work just fine. Only thing: No matter at what post-type I ...
mathiregister's user avatar
1 vote
1 answer
255 views

Wordpress metaboxes - textfield suggestion automatically populated

[Long story short] Is there any Wordpress plugin/function that would allow the creation/integration of a metabox's textfield that automatically populates a dropdown menu (in the admin area, while in ...
Cerere's user avatar
  • 231
0 votes
1 answer
5k views

Use a shortcode to display custom meta box contents

Is this possible? If so, can someone point me towards a clear tutorial? I have a column of content I want to float right of the_content, so I'd like to be able to use a shortcode to put that content ...
Justice Is Cheap's user avatar
0 votes
3 answers
755 views

Global custom meta box

I am trying to create a custom meta box for multiple custom post types in WordPress without creating duplicate code. Currently I have: add_meta_box('adv_form_box1', 'Advanced Form', 'adv_form1', '...
ZaneDeFazio's user avatar
0 votes
2 answers
669 views

custom post type metaboxes not saving

I have the following code. I am trying to enter data into the custom metabox and then save it. When I go to view it has entered a post, however the name column has nothing in it. Also when I hit save ...
Anders Kitson's user avatar
3 votes
1 answer
6k views

Why is my custom meta box input not saving

I've added the following function to functions.php to add a custom meta box enabling the end user to input a gallery shortcode. I then intend to use this to place a gallery in a specific place on the ...
Raskolnik's user avatar
  • 143
2 votes
1 answer
324 views

More than one meta field in a single meta box?

I'm following this tutorial by Justin Tadlock on creating meta boxes. http://wp.smashingmagazine.com/2011/10/04/create-custom-post-meta-boxes-wordpress/ I can get a meta box with a single field to ...
Brigante's user avatar
  • 297
0 votes
2 answers
1k views

Get fields from metabox array

In my functions I'm registering multiple metaboxes with custom fields. A single metabox array for instance, looks like this: In functions.php $meta_boxes[] = array( 'id' => 'general_info', ...
at least three characters's user avatar
21 votes
3 answers
22k views

How to change default position of WP meta boxes?

Im wondering if there is a way to change the default position of Wordpresses meta boxes such as "featured image" for custom post types without having to drag them manually? Example:
Mr.Brown's user avatar
  • 1,045
1 vote
1 answer
1k views

Linking text within textarea of custom meta box

I'm using 'Meta Box Script for WordPress' to create custom meta boxes and everything is working great...except the following: We have a textarea that we want to act, basically as another WP ...
Justice Is Cheap's user avatar
0 votes
1 answer
186 views

How to change a meta value (of a published post) after X days.?

I have a custom field. I would like to change the text of that custom field after x days. I want something like this: if ( published post is more than 90 days old ) { echo "your post is more ...
PrivateUser's user avatar
  • 3,469
7 votes
4 answers
8k views

Removing Metabox for "Slug" without removing functionality

Here is an interesting question. I have recently noticed that if you utilize the code remove_meta_box('slugdiv', 'post', 'normal'); you are actually unable to modify the slug when you click on the ...
NetConstructor.com's user avatar

1
2