Tag Info

Hot answers tagged

2

From /wp-includes/script-loader.php: $scripts->add( 'media-grid', "/wp-includes/js/media-grid$suffix.js", array( 'media-editor' ), false, 1 ); From wp-admin/upload.php: wp_enqueue_script( 'media-grid' ); wp_enqueue_script( 'media' ); wp_localize_script( 'media-grid', '_wpMediaGridSettings', array( 'adminUrl' => parse_url( self_admin_url(), ...


2

Of course you can specify only the items you want to remove. Have a look in the code below: /wordpress/wp-content/plugins/your_plugin/your_plugin.php : add_action('admin_init', 'nwcm_admin_init'); function nwcm_admin_init() { // Remove unnecessary menus $menus_to_remove = array( // menu items you want to remove 'menu_item_1', ...


2

Open comments.php file inside your theme's folder <?php if ( comments_open() ) : ?> <?php $fields = array( 'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name', 'responsive' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) . '<input id="author" ...


2

Per comments, it's called with call_user_func_array, so the 1st 2 elements get assigned to the declared arguments $elements and $max_depth, leaving the third element ($r which is the original $args) to be assigned via array_slice to $args. Eg function wpse172812( $elements, $max_depth ) { $args = array_slice(func_get_args(), 2); ...


1

See get_post_meta() Example: get_post_meta($post->ID, 'EXAMPLEFIELD', true);


1

By using get_post_meta() fetch the custom field data $key_value = get_post_meta( get_the_ID(), 'key', true ); // check if the custom field has a value if( ! empty( $key_value ) ) { echo $key_value; } also see for more detail get_post_meta()


1

You may also want to remove the meta boxes from the Post Creation page // REMOVE POST META BOXES function remove_my_post_metaboxes() { remove_meta_box( 'categorydiv','post','normal' ); // Categories Metabox remove_meta_box( 'tagsdiv-post_tag','post','normal' ); // Tags Metabox } add_action('admin_menu','remove_my_post_metaboxes');


1

You typed "mobiles" when you said you wanted to check for post type "mobile". So simply remove the s ;). <? if( post_type_exists( 'mobiles' ) ) { echo 'The Products post type exists';} ?> Should be: <? if( post_type_exists( 'mobile' ) ) { echo 'The Mobile post type exists';} ?> If it's still not working, triple check if you ...



Only top voted, non community-wiki answers of a minimum length are eligible