WordPress Custom Post Type – Post Attribute: Template. Template shows up and saves on the back end, but the default theme file is being rendered

in your code: $labels = array( ‘name’ => _x( ‘Locations’, ‘info_locaiton’ ), ‘singular_name’ => _x( ‘Location’, ‘info_location’ ) ); use this: $labels = array( ‘name’ => _x( ‘Locations’, ‘info_location’ ), ‘singular_name’ => _x( ‘Location’, ‘info_location’ ) ); In $labels variable name array value has different slug. I think this can be a problem. So, you … Read more

My own theme’s custom widget areas are not working

I fixed your functions.php code: <?php add_theme_support(‘post-thumbnails’); add_theme_support(‘menus’); /** * Enqueue scripts * * @param string $handle Script name * @param string $src Script url * @param array $deps (optional) Array of script names on which this script depends * @param string|bool $ver (optional) Script version (used for cache busting), set to null to disable … Read more

How to serve a amp template

I think you need to have another look at the AMP documentation. You simply have to include the link to the AMP version of the article in the header of the post. <link rel=”amphtml” href=”http://www.example.com/post-slug/?amp” /> After Google recognizes your posts have AMP versions it will automatically serve the AMP version for you. Also, this … Read more

How to override post-new.php with custom template

This does sound very challenging. post-new.php isn’t template really. It’s a full–featured endpoint, that is PHP script directly requested by browser and processed by PHP engine as entry point. There is no good point to intervene this early in the process. The bulk of output is handled by wp-admin/edit-form-advanced.php which is hardcoded in it as … Read more