The permalink redirecting to current article on single.php page

It seems like, you have added permalink for categories inside span tag. Where do you want to add permalink actually? If you want to apply permalink for post title, then add permalink inside <h4> tag. currently your href is empty inside <h4> element. <h4 class=”post-title”> <a href=”<?php echo get_the_permalink() ?>”><?php the_title(); ?> </a> </h4>

Count custom posts type and filter by tag

wp_count_posts is not affect your custom query. You can use found_posts to return the number of posts from the custom query. So try to change the code after your loop query as follows. Hope it helps. if ($loop->have_posts()) : $count_posts = $loop->found_posts; echo “<p>Total: $count_posts cars</p>”; else : echo “<p>No cars available.</p>”; endif; wp_reset_query();

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