How to get related posts and wp comments under tabs

You need to use do_shortcode() for the shortcode to actually work inside PHP function add_post_content($content) { if(!is_feed() && !is_home()) { $above=”<p></p>”; $content_of_first_tab = ‘A list of related posts ‘; $args= array( ‘number’ => ‘5’, ‘post_id’ => get_the_ID(), // use post_id, not post_ID. ); $comments = get_comments( $args ); $output=””; foreach ( $comments as $comment ) … Read more

Why isn’t comment validation working?

Add code in your theme function.php file function comment_validation_init() { if(is_single() && comments_open() ) { ?> jQuery(document).ready(function($) { $(‘#commentform’).validate({ rules: { author: { required: true, minlength: 2 }, email: { required: true, email: true }, comment: { required: true, minlength: 20 } }, messages: { author: “Please fill the required field”, email: “Please enter a … Read more

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