How do I find the directory of a page template?

You can simply right click on your Template Select on the edit page, Inspect Element (on Chrome) then you can check the different options in the select like “page-template.php” as value and find your template file. 🙂 <select id=”inspector-select-control-0″ class=”components-select-control__input”> <option value=””>Default</option> <option value=”page-my-account.php”>My Account</option> </select> It should look like this with your own templates.

How to get the most recent modified date of anything in the footer of my site?

Just a continuation from mozboz’ answer. For those curious as I was, you could use the date() or date_i18n() functions to format the date properly in the following snippet. function get_latest_update_date() { global $wpdb; $thelatest = $wpdb->get_var(“SELECT max(post_modified) FROM wp_posts WHERE post_type IN (‘post’, ‘page’);”); //returns formatted date like 13.08.2001 return date_i18n(‘j.m.Y’, strtotime($thelatest)); } add_shortcode(‘latestupdatedate’, … Read more

Missing .twig files in wordpress theme editor

The thing you need to do is update the filter with the “allowed” editor file types. Here’s what you’ll need for TWIG: function add_custom_editor_file_types( $types ) { $types[] = ‘twig’; return $types; } add_filter( ‘wp_theme_editor_filetypes’, ‘add_custom_editor_file_types’ ); Of course, you can add any file type/extension you wish in the same manner. The editor UI will … Read more

Automatically add custom CSS to new posts using a category template

If you have created a custom php template then add a specific class selector to your css within this template. As an example: <body class=”mycustomclass”>all your page content</body> or <content class=”mycustomclass”>all your content content</content> It doesn’t have to be on body or content or any other specific part of the page but make it encompass … Read more