0

I wanted to add meta box with current post format like when i select video post format then there will be appear video url input post just under the post editor. How to do that? any help

2
  • What's the 'current' post format? Nov 30, 2016 at 20:01
  • like when i select video post format, then there will be appear video url meta box down the editor box Dec 1, 2016 at 10:55

1 Answer 1

1

If you want it just for the native post post type, then put this in your functions.php

add_action('init', 'my_theme_setup');
function my_theme_setup(){
    add_theme_support( 'post-formats', array( 'aside', 'gallery' ) );
}

The Post Format meta box will now appear down the side of your screen on the post creating/editing page.

Full list of available post formats to pass into the add_theme_support function - https://codex.wordpress.org/Post_Formats

2
  • I wanted to add meta box with current post format like when i select video post format then there will be appear video url input post just under the post editor Dec 1, 2016 at 10:58
  • 1
    Oh ok. This is going to require JS/AJAX. I suggest first installing the Advanced Custom Fields plugin - advancedcustomfields.com, and if you don't want to use a third-party plugin, then look at it's code to get a head start.
    – Dan.
    Dec 1, 2016 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.