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

Is it possible to return a specific tag archive/template as one of the search results?

A simple way to do is to edit your theme’s “search.php” (copying it from the parent theme into your child theme’s directory first if you’re using a child theme) and then before the posts loop putting something like: <?php if ( $tag = get_term_by( ‘name’, get_search_query(), ‘post_tag’ ) ) { ?> <article><!– or whatever is … Read more

Category template not displaying all post formats

Reading the codex on get_template_part and get_post_format will help you a lot here. It’s hard to say for sure without knowing what files are in your theme but get_template_part( ‘content’, get_post_format() ); is essentially saying use the template named content-format.php, where format is one of image, video, gallery etc. One of a few things is … Read more

Including Custom Template on template_include Filter not working

I would suggest you copy page.php into your custom template, and then modify the code as required. At the very least, your template should look something like: <?php get_header() ?> <?php while ( have_posts() ) : the_post() ?> <article <?php post_class() ?>> <?php the_title( ‘<h1 class=”entry-title”>’, ‘</h1>’ ) ?> <div class=”entry-content”> <?php the_content() ?> </div> … Read more

Where is search.php?

Normally, copying index.php file for the theme as search.php will let you have a new base template to work off of with the same styles and look as your theme, assuming the theme implemented index.php decently. That would give you a solid start to be able to make changes to provided nothing is using a … Read more

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