Help displaying related categories

Replace wp_get_post_tags($post->ID); with wp_get_post_terms($post->ID); All parameter and details can be found here and change the $args parameter $args = array( ‘category__in’ => array($simlar_tag), ‘post__not_in’ => array($post->ID), ‘posts_per_page’ => 3, ‘meta_query’ => array(array(‘key’ => ‘_thumbnail_id’, ‘compare’ => ‘EXISTS’)), ‘ignore_sticky_posts’ => 1, ); Hope it works!

date_query problem

You’re looking for the get_adjacent_post function. This is a built-in wordpress function that you can use to get either the previous or next post from the current post. To get the next post: $next_post = get_adjacent_post( false, ”, false, ” ); To get the previous post: $prev_post = get_adjacent_post( false, ”, true, ” ); You … Read more

make query more simplest and in one query

You can try this <?php $args= array( “post_type” => array(“product”, “post”, “page”), “cat” => ‘-124,-52’, “meta_query” => array( array( “key” => ‘include_newsletter_feed’, ‘value’ => “”, ‘compare’ => ‘!=’ ), ), ); $wp_query = new WP_Query($args); ?>

Using something else instead of using 9 wp_query

I don’t have a full detailed response for you, but here’s a few things I’d suggest: 1) Use template parts for each of those segments. That will help clean up the template so it’s easier to work with in the future. ( see here: https://konstantin.blog/2013/get_template_part/ ) 2) You could then create a helper function for … Read more

how to get dynamic data on wordpress from codeigniter?

If your footer file name is abc.php inside Codeigniter pages and you want to run that file in the WordPress directory. In the footer.php file in WordPress include your abc.php file. Otherwise, you can make your own functions to call or manage the content. <?php include ‘abc.php’; ?>