Tag Info

Hot answers tagged

2

include the conditional tag is_paged() within your if statement; example: if ( $i == 1 && !is_paged() ) :


2

You can do this easy way or hard way. Hard way would be you creating custom functions to remove all menu classes and add FontAwesome icons accordingly. And easy way would be this. Go to Appearance > Menus And add FontAwesome icons in menu items. Like this. Note: You don't need to change page titles on each page. Just menu labels.


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" ...


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