What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-10-28 16:13:08
wordpress if thumbnail show else
<?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } else { ?> <img src="<?php bloginfo('template_directory'); ?>/images/default-image.jpg" alt="<?php the_title(); ?>" /> <?php } ?> Add solution -
Other 2021-10-16 21:20:03
wordpress default post post type
//this is for post query with default paggination and //post with comment only and with post type gallery if you need all then remove the the comment_count array <?php $paged = ( get_query_var('paged') ) ? get_query_var( 'paged' ) : 1; qu... Add solution -
Other 2021-09-22 07:09:04
wordpress fetch all comment which has the post query
//this is for post query with default paggination and //post with comment only <?php $paged = ( get_query_var('paged') ) ? get_query_var( 'paged' ) : 1; query_posts( array ( 'comment_count' => array( ... Add solution