get “read more” with custom DB query like you would with WP Query

The <!– more –> tag isn’t applied via the the_content filter, it’s included in the get_the_content() function, which checks for the existence of the tag within the content using a regex and then outputs the more link appropriately. this output is filtered via the the_content_more_link filter, but since you’re not using get_the_content() you won’t be … Read more

display news with pictures 3 small and one large (loop)

I don’t know why have you put $b%4==1 condition. You can simply check for $b==1.And one more thing I would suggest is to use if and else both.So code would be something like this: <?php $b=1; $args = array( ‘tax_query’ => array( array( ‘taxonomy’ => ‘gens’, ‘field’ => ‘slug’, ‘terms’ => ‘newsgen’ ) ), ‘post_type’=>”, … Read more

WordPress custom post type queries

This all depends on what you’re actually saving in your post meta. If you’re actually saving the ID you could create a secondary query on your single-post_type.php page. <?php if( have_posts() ) : ?> <?php while( have_posts() ) : the_post(); $cpt2_meta = get_post_meta( $post->ID, ‘_meta_name’, true ); // Get out Post Type 2 Meta ?> … Read more