Wordpress -- add description below to featured image -
i add annotation below featured image box in post page ,saying
'recommended image size: 1300px (width) x 340px (height)
is possible in wordpress 4.2.2.
the text admin user better guidance.
any highly appreciated. in advance.
you should go wp-admin->includes->post.php
, around line 1295 (depending on version) find:
if ( !empty( $thumbnail_html ) ) { $ajax_nonce = wp_create_nonce( 'set_post_thumbnail-' . $post->id ); $content = sprintf( $set_thumbnail_link, $upload_iframe_src, $thumbnail_html ); $content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail" onclick="wpremovethumbnail(\'' . $ajax_nonce . '\');return false;">' . esc_html__( 'remove featured image' ) . '</a></p>'; }
change to:
if ( !empty( $thumbnail_html ) ) { $ajax_nonce = wp_create_nonce( 'set_post_thumbnail-' . $post->id ); $content = sprintf( $set_thumbnail_link, $upload_iframe_src, $thumbnail_html ); $content .= '<p class="hide-if-no-js"><a href="#" id="remove-post-thumbnail" onclick="wpremovethumbnail(\'' . $ajax_nonce . '\');return false;">' . esc_html__( 'remove featured image' ) . '</a><span style="display:block;">recommended image size: 1300px (width) x 340px (height)</span></p>'; }
it not recommended change core files changes can lost during update, don't recommend creating plugin small change.
Comments
Post a Comment