save_post affect creation and deletion

There are something wrong in your code, Here I edited what you tried, function rohs_update_title($post_ID){ $post_type = get_post_type($post_ID); // If this isn’t a ‘rohs_menu’ post, don’t update it. if ( “rohs_menu” != $post_type ) return; $postAuthorId = get_post_field( ‘post_author’, $post_ID ); // get the post author ID $userToGetData=”user_”.$postAuthorId; $restaurantName = get_field( ‘nom_restaurant’, $userToGetData ); $date … Read more

How to add custom classes to a WordPress theme HTML tag?

There is no designated template tag for classes on html container. For example in latest core Twenty Seventeen theme they are hardcoded: <html <?php language_attributes(); ?> class=”no-js no-svg”> For proper customization you would likely need to create a child theme and override repsective template (likely header.php) or settle on manipulating classes with JavaScript.

How to use custom footer template in a site-plugin?

You cannot override header / footer templates from a plugin, you’ll have to change the theme. theme_page_templates can be used to change the general template for the post type page. That template then uses get_header() and get_footer(), which in turn include header.php / footer.php (optionally header-$name.php, if a parameter has been passed to get_header(), same … Read more