How do I change the scan depth for page template files?
Nope. Unortunatly 1 directory depth is hardcoded as second argument for get_files method in method WP_Theme -> get_page_templates.
Nope. Unortunatly 1 directory depth is hardcoded as second argument for get_files method in method WP_Theme -> get_page_templates.
It is due to css: Check this(Line # 314 style.css): .search-form .screen-reader-text { left: -9999px; overflow: hidden; position: absolute; } Remove the left margin then it works fine. It is on sidebar search form. Sorry for English. Thanks
I find the solution of your problem. In this theme, you can’t set page as home or front page, so your setting in Setting >> reading >> Your latest posts check. For blog page you can select template in your Blog page Page Attribute Template option as Blog or Blog template with large image. You … Read more
I’ve been using this approach for private theme updates using versioned archives and it seems to work for me pretty well. No problems found yet. So I guess for private themes – it is a good one. Also I came up with a script for building versioned theme archive like this: #!/bin/bash echo “======================”; echo … Read more
You just want to add a check to see if a constant has been defined. If it hasn’t you’ll know the file is being accessed directly. if ( ! defined ( ‘ABSPATH’) ) die ( ‘No soup for you!’ ); Add this to every file you don’t want to be directly accessed. Also, anything you … Read more
I’m not entirely certain I understand what you mean but whenever a Page Template is set WordPress also sets postmeta with a specific key and value. The key is called _wp_page_template and the value holds the template location relative to the theme. So you could do this: $pages_with_templates = new WP_Query( array( ‘post_type’ => ‘page’, … Read more
You are doing something wrong in your theme, maybe “hiding” the sidebars with css instead of not displaying them at all. The customizer is supposed to display only the sidebars which are actually active on the page.
You need to hook wp_add_inline_style to wp_enqueue_scripts. Check the codex example. Something like (not tested): function lethal_post_circle_background(){ global $post; $id = $post->ID; $custombgcolor = get_post_meta( $id, ‘bgcolor’, true ); $custombgimage = get_post_meta( $id, ‘bgimage’, true ); if($custombgcolor | $custombgimage){ $css=”.post-“.$id.’ .post-circle{ background:’; if($custombgcolor) $css .= $custombgcolor . ‘ ‘; if($custombgimage) $css .= ‘url(“‘ . $custombgimage … Read more
In author.php: <?php get_template_part(‘custom-author-file’); Alternatively, rename your custom-author-file.php to author.php. The URL being used in this case isn’t relevant, as a template doesn’t determine the URL used, it’s the other way around. However, I suspect there is more to your question you haven’t explained
It looks like the code you copied from is missing the part where your child theme styles are actually added to WordPress. It’s a little strange they skipped over this, mind you! From the WordPress Codex article on child themes, you just need to modify your style enqueueing function so it includes this: wp_enqueue_style( ‘child-style’, … Read more