Enter your keyword

Blogs

How to add custom Scripts into Genesis Child Theme

 

// Add add custom Scripts into Genesis Child Theme
add_action( 'wp_enqueue_scripts', 'dsweb_enqueue_script' );
function dsweb_enqueue_script() {
    wp_enqueue_script( 'customscript', get_stylesheet_directory_uri() . '/js/custom.js', array( 'jquery' ), '', true );
}

 

How to Show Featured Image in Rss Feed

Add This Code functions.php for Show Thumbnail Featured Image in Rss Feed

function featured_image_in_rss($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = '' . get_the_post_thumbnail( $post->ID, 'thumbnail') . '
' . $content.'
'; } return $content; } add_filter('the_excerpt_rss', 'featured_image_in_rss'); add_filter('the_content_feed', 'featured_image_in_rss');

If you want display larger images instead, change the word 'thumbnail' to 'medium', 'large' or 'full'.

Add This Code functions.php for Show Full Size Featured Image in Rss Feed

function featured_image_in_rss($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = '' . get_the_post_thumbnail( $post->ID, 'full') . '
' . $content.'
'; } return $content; } add_filter('the_excerpt_rss', 'featured_image_in_rss'); add_filter('the_content_feed', 'featured_image_in_rss');