Updating post meta and Meta Box plugin
Updating post meta and Meta Box plugin
Updating post meta and Meta Box plugin
Adding a Custom ‘Now’ button under ‘Published on’ header to return current date and time
Managed to fix this by installing the “Advanced Tinymce” plugin. I found that when my main rich text editor was switched to “text” that the other editors displayed differently and outputted the html. Odd!
when saveing $meta_box i get Undefined index error
I too have come across this strange issue, I am not sure why $post_id doesn’t contain the post id. Please try the below snippet and this would work Use the global $post and use $post->ID in update_post_meta add_action( ‘save_post’, ‘save_TodoList’ ); /* When the post is saved, saves our custom data */ function save_TodoList() { … Read more
First you need to get the value from attributes, option page or meta value; if you have an option page you need to call that value: $valuerequired = get_option(‘ctech_valuefromoptionpage’); ctech is the short theme name, and if the attributes field is a meta value $price = get_post_meta($post->ID, ‘price’, true); then you can echo the value … Read more
Just got this working adding a text metabox for the youtube id. Then added this lines before the link in the slider just below the opening tag: <?php if ( get_post_meta( get_the_id(), ‘video’, true) != ” ) { $video= get_post_meta( get_the_id(), ‘video’, true); ?> Here goes the embed code but we replace with <?php echo … Read more
How to show metabox key to custom post?
Custom metabox for file upload return empty filename
It seems that esc URL was the culprit. Even though I wanted to hard code the base URL eg. http://facebook.com/ I was esc_url’ing the input field for which to append to the base. I’ve switched to using a regular text field and am esc_url’ing the entire output string.