Different markup for each post format

Since you need a specific HTML structure let’s keep things clean and do what The Codex suggests – break it into template parts based on the post format. Let’s create a subfolder in your theme to store these post formats, maybe POST_TYPE_SLUG-formats so it’s clear what is in this folder ( Replace the uppercase with … Read more

Display Post Format as a String

Try: <?php echo get_post_format_string( get_post_format() ); ?> EDIT Note, if you want a fail-safe output, try this: <?php if ( get_post_format() ) { echo get_post_format_string( get_post_format() ); } else { ehco ‘Standard’; } ?> Or, if you want to store it in a variable: <?php $post_format_string = ( get_post_format() ? get_post_format_string( get_post_format() ) : ‘Standard’ … Read more

Hide meta box based on post format

Try this one: jQuery( document ).ready( function($) { // Starts by hiding the “Video Options” meta box $( “#video-options” ).addClass( “hidden” ); if( $( “input#post-format-video” ).is(‘:checked’) ){ $( “#video-options” ).removeClass( “hidden” ); } // If “Video” post format is selected, show the “Video Options” meta box $( “input#post-format-video” ).change( function() { if( $(this).is(‘:checked’) ){ $( … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)