WordPress Custom Function error, ask for help, thank you
WordPress seeks some help.
I would like to give each article under a classification according to the current article to do an article recommendation,
The following code function is implemented, but there is a very serious problem, that is, the comment has a problem,
After adding the following code, the comment to the article becomes a category comment, each article is, and after the comment the article becomes another page
PHP Code
cat_id. ','; The ID of the current article's classification is //echo $category->cat_name. ' '; The name of the classification of the current article} $my _query = new Wp_query ("cat=". $cat _id. " &posts_per_page=5 "); while ($my _query->have_posts ()): $my _query->the_post ();? >
"alt=" "title="
"/>
/images/dummy.png" alt= "" title= "
"/>
"Title=" " >
------Solution--------------------
PHP Code
$cat _id.= $category->cat_id. ','; ID of the classification of the current article
------Solution--------------------
"Into a classified review"?? Or has it turned out to be your last recommendation article comment? Did you jump to the article after the comment?
Check to see if your $id is changed by this loop you added.
Explore
WordPress seeks some help.
I would like to give each article under a classification according to the current article to do an article recommendation,
The following code function is implemented, but there is a very serious problem, that is, the comment has a problem,
After adding the following code, the comment to the article becomes a category comment, each article is, and after the comment the article becomes another page
PHP Code
Featured Articles
?>
$cat _id= "" ...