Skip to content

Instantly share code, notes, and snippets.

@remcotolsma
Created December 26, 2015 12:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
WordPress custom featured image labels.
<?php
function demo_enqueue_scripts() {
wp_enqueue_style( 'twentysixteen', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'demo', get_stylesheet_directory_uri() . '/style.css', array( 'demo_enqueue_scripts' ) );
}
add_action( 'wp_enqueue_scripts', 'uitgelichteafbeelding_enqueue_scripts' );
function demo_init() {
register_post_type( 'project', array(
'public' => true,
'label' => 'Projecten',
'labels' => array(
'featured_image' => __( 'Project afbeelding', 'demo' ),
'set_featured_image' => __( 'Project afbeelding instellen', 'demo' ),
'remove_featured_image' => __( 'Project afbeelding verwijderen', 'demo' ),
'use_featured_image' => __( 'Gebruik project afbeelding', 'demo' ),
),
'supports' => array(
'title',
'editor',
'thumbnail',
),
) );
}
add_action( 'init', 'demo_init' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment