Is it better practice to create many page templates, or a a few base templates with custom HTML added via TinyMCE?

I use multiple templates, but also use code for some pages. For example, if I have a site with 3 sections, About, Products, and Research I would create page-about.php, page-products.php and page-research.php. These can be customized as necessary though usually they are simply pulling in unique sidebars which I want to include on all pages … Read more

strange behaviour of template_redirect in IE8

I am updated the answer, so that it will be helpfull to others as well. (For IE, IIRC it’s 512 bytes) Helpful links: https://stackoverflow.com/questions/11121286/404-page-not-showing-up-in-ie9#answer-11133855 https://stackoverflow.com/questions/3970093/include-after-php-404-header-returning-oops-this-link-appears-to-be-broken

List all pages using a specific template on a page

You can create a custom post type called blog. This would group all your “blog” posts together. Once you have that done, create a template file called archive-blog.php, this will be the file that you can use to list all your posts under the “blog” custom post type. For a single post view, the template … Read more

custom template – override plugin template in child theme – issue with scripts

Please Provide Proper path to enqueue scripts and styles Example- function theme_name_scripts() { wp_enqueue_style( ‘style-name’, get_stylesheet_uri() ); wp_enqueue_script( ‘script-name’, get_template_directory_uri() . ‘/js/example.js’, array(), ‘1.0.0’, true ); } add_action( ‘wp_enqueue_scripts’, ‘theme_name_scripts’ ); then it will work fine

Problem displaying replies as part of author’s latest comments on author page

My bad. Should have added a foreach for the replies as well. <?php $args = array( ‘user_id’ => $curauth->ID, ‘number’ => 5, ‘status’ => ‘approve’, ‘parent’ => 0 ); $comments = get_comments($args); if ( $comments ) { foreach($comments as $c){ echo ‘<ul id=”authorcomments”>’; echo ‘<li>’; echo ‘<a id=”authorcommentlink” href=”‘.get_comment_link( $c->comment_ID ).'”> ‘; echo get_the_title($c->comment_post_ID); echo … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)