Add top parent page id to body class

found it: add_filter( ‘body_class’, ‘dc_parent_body_class’ ); function dc_parent_body_class( $classes ) { if( is_page() ) { $parents = get_post_ancestors( get_the_ID() ); $id = ($parents) ? $parents[count($parents)-1]: get_the_ID(); if ($id) { $classes[] = ‘top-parent-‘ . $id; } else { $classes[] = ‘top-parent-‘ . get_the_ID(); } } return $classes; }

How to make jquery slider to start afresh [closed]

HTML <div class=”container” id=”slider-container”> <div id=”slide1″ class=”slider-slide”>My first slide goes here</div> <div id=”slide2″ class=”slider-slide”>My second slide goes here</div> <div id=”slide3″ class=”slider-slide”>My third slide goes here</div> </div> Javascript ( function( $ ){ let firstDIV = currentDIV = $( ‘#slider-container div’ ).first(); if( firstDIV.length > 0 ){ setInterval( () => { currentDIV = currentDIV.hide().next(); if( currentDIV.length === … Read more

WordPress childtheme not loading any CSS/SCSS

after you registered and activated child theme you should add wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri( ) . ‘/css/screen.css’, array(‘parent-style’, ‘bigfoot-style’, ‘bigfoot-css’), wp_get_theme()->get(‘Version’)); in your childs theme functions , i assume by adding get_stylesheet_directory_uri( ) to your main theme ytou get wrong path , and there is a space in get_stylesheet_directory_uri( ) <=== please remove space from brackets.“`

Blog page and the Home page showing the same content

at the begining in wordpress dashboard ( panel) go to pages and create 2 pages, one ‘home’, and another ‘posts’. After navigate in admin panel to settings section and select ‘reading’ option which looks => From there select your freshly created pages for each purpose, you can edit content of pages in admin dashboard => … Read more