wordpress change post format

Solutions on MaxInterview for wordpress change post format by the best coders in the world

showing results for - "wordpress change post format"
Manuel
14 Feb 2017
1add_theme_support( 'post-formats', array('aside','video','gallery','chat'));
2
3function rename_post_formats($translation, $text, $context, $domain) {
4    $names = array(
5        'Aside'  => 'No Featured image',
6        'Chat'  => 'Full Width',
7    );
8    if ($context == 'Post format') {
9        $translation = str_replace(array_keys($names), array_values($names), $text);
10    }
11    return $translation;
12}
13add_filter('gettext_with_context', 'rename_post_formats', 10, 4);