Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@wordpress:/var/lib/wordpress/wp-content/themes/twentyseventeen-child# cat functions.php
- <?php
- function my_theme_enqueue_styles() {
- $parent_style = 'twentyseventeen-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.
- wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
- wp_enqueue_style( 'child-style',
- get_stylesheet_directory_uri() . '/style.css',
- array( $parent_style ),
- wp_get_theme()->get('Version')
- );
- }
- // Create Custom Post Type for Work
- function create_post_type() {
- register_post_type( 'farmer',
- array(
- 'thumbnail',
- 'labels' => array(
- 'name' => __( 'Custom' ),
- 'singular_name' => __( 'Custom' )
- ),
- 'public' => true,
- 'has_archive' => true,
- 'rewrite' => array('slug' => 'custom'),
- 'taxonomies' => array('category', 'post_tag'),
- 'supports' => array( 'thumbnail' )
- )
- );
- }
- add_action( 'init', 'create_post_type' );
- add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement