Page templates for custom post types

You can certainly set up a page template for custom post types. Give this a whirl: <?php /* Template Name: Your template name */ // Get header get_header(); ?> <div id=”primary”> <?php // Query post type $the_query = new WP_Query( array( ‘post_type’ => ‘cpt_name’, ‘posts_per_page’ => -1 ) ); if ( $the_query->have_posts() ) : ?> … Read more

Page.php vs Single.php

Edit Based on this comment: commenting out comments_template works. The problem lies in the template markup in comments.php. The likely reason that you see it in some output and not others is likely because you’ve got comments enabled in one context, and not in the other. Try comparing single posts with comments enabled vs disabled, … Read more

Loop inside page template not working

From https://wordpress.org/support/article/creating-a-static-front-page/, Posts Page: (if not already created) create an empty page. Give it a Title that will be used on top of your posts list. This step is mandatory as you are modifying the WordPress default setting. Any other content other than Title will no be displayed at all on this specific page. So, … Read more

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