i want to fetch post with categories and tags
currently i’m using :
$mysql = mysqli_query($con,"SELECT p.post_title,
p.ID,
p.post_content,
p.post_date,
p.post_name as url,
t.name as category_name
FROM wp_posts p,
wp_terms t,
wp_term_relationships r,
wp_term_taxonomy tt
WHERE p.post_status='publish' AND
tt.taxonomy = 'post_tag' AND
p.id=r.object_id AND
r.term_taxonomy_id=tt.term_taxonomy_id AND
tt.term_id = t.term_id order by p.post_date desc limit ".(int)($pageNumber*$pageSize).",".(int)$pageSize."") or die ("error".mysqli_error($con));

$pagesize = 20; and $pageNumber = 1 ;

all my connection are working but when i run this code blank page come

Read more here: How to run select query of post with category and tags?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: