Skip to content

Instantly share code, notes, and snippets.

// Get featured image
<?php get_the_post_thumbnail_url(); ?>
// Content loop
<?php while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
//Add Custom Style
add_action('wp_enqueue_scripts','custom_child_styles_scripts',999);
function custom_child_styles_scripts()
{
wp_enqueue_style('custom-css',get_stylesheet_directory_uri().'/dist/custom.css',array(),'1.0.0',false);
}
//Removed unwanted menus
@rahuladams
rahuladams / Custom Post Type UI - Display in theme.
Created June 19, 2020 12:40
How to display Custom Post Type UI content in the theme.
<?php
$args = array(
'post_type' => 'cptui_post_slug',
'posts_per_page' => 10,
'orderby' => 'meta_value_num',
'order' => 'ASC',
'paged' => $paged,
);
$post_name = new WP_Query( $args );