Tagged Questions
0
votes
0answers
15 views
Dynamic Custom Menus [closed]
I've created a meta box so my client can choose which custom menus to use on certain pages. That seems to be working fine. However, I've created a second menu but only the original menu is showing up ...
1
vote
1answer
45 views
How to remove a metabox from menu editor page?
I am not sure if it is much different for any page but I am wondering how to remove a metabox from the appearance>menu page without having to go into the wordpress core files and remove it. Is there ...
0
votes
0answers
32 views
How to tell if string is null or empty in meta value? [closed]
I am trying to figure out how to find out if a string is null or empty in php. The place I am pulling the value from is a meta value that is stored from a meta box on the post page.
I want to check ...
0
votes
1answer
34 views
How can I create a menu items from meta box based on users input
I have created a metabox that takes a name that the user can give as an additional name of their post. I am wondering how I can automatically create a menu item based on the name the user input into ...
1
vote
1answer
20 views
Trying to retrieve post meta
I have created a meta box that allows users to add an additional name/id to their post. From what I can tell it is adding the meta information correctly because when I edit a post that has a custom ...
0
votes
1answer
65 views
Get post meta retrieving wrong value
I created a custom meta box with a textbox where the user can enter a custom value in as an additional identification tag. I thought I had it right but when I try to retrieve the value it is giving me ...
0
votes
1answer
41 views
Saving multiple Metabox contents
I'm putting together a fairly simple Custom Page for a friend on their WordPress site, but I'm having some real difficulties getting the contents of the Metaboxes to save correctly. WordPress doesn't ...
2
votes
2answers
58 views
Auto close (hide) custom metabox / set default state
I am using the WordPress function add_meta_box() to add my own custom metabox.
So how can I auto close/hide on page open ?
Currently, I just add a CSS class closed to metabox's <div> element ...
0
votes
1answer
59 views
How to hide a plugin metabox for non admins when a user adds a new post
I've been able to disable all the meta boxes for non admin in their backend but I'm having problems with Facebook AWD All in one which creates a widget seen by all the users when they create new ...
0
votes
0answers
28 views
Check Types custom checkbox and metadata when publish post
I´m using Types to create metaboxes with custom checkboxes to make some custom functions. The problem I have is with this function I created:
function check_zone_tag(){
$postid = get_the_ID();
...
1
vote
1answer
72 views
Custom Metabox Not Saving
I've simplified a problem of saving custom metaboxes on update and still can't get the box to save the custom-field input to the database.
This is the call from functions.php to an external file ...
0
votes
1answer
72 views
Custom metabox not working
Morning!
I have a call in my functions.php file to include a custom meta-box php file in my theme's directory called: /metaboxes/home-meta.php
The code is as follows for the call:
add_action( ...
1
vote
2answers
109 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?
0
votes
1answer
36 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!= "" );
...
0
votes
1answer
227 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 ...
0
votes
1answer
66 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, ...
0
votes
2answers
643 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 ...
0
votes
1answer
148 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 ...
3
votes
3answers
757 views
Does Wordpress have a “Form API”
I do most of my development in Drupal, however I am working on a Wordpress site and I need to make a form. Which got me thinking, is there a Form API for wordpress like there is Drupal? Is there a way ...
0
votes
1answer
594 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 ...
0
votes
3answers
171 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', ...
0
votes
2answers
227 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 ...
2
votes
1answer
421 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 ...
2
votes
1answer
92 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 ...
0
votes
1answer
265 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',
...
4
votes
2answers
2k 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:
1
vote
1answer
128 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 ...
0
votes
1answer
121 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 ...
4
votes
3answers
1k 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 ...