No worries.
Mistakes always happen.
And thank you so much for being patient with me.
Problem solved and case closed. 🙂
Thanks, John.
If you don’t mind, I am going to ask you a dumb question, as I am still learning.
So, a lot of time, I will google for answers related to what I want.
Below is the solution I found after you told me to use “get_terms”.
Instead of showing only the selected categories for the post, it listed every single category I have created. Can you give me some clue why?
$args = array(
"hide_empty" => false,
"taxonomy" => "project-category",
);
$terms = get_terms($args);
foreach($terms as $term){
echo $term->name.", ";
}?>
I hope I am not disturbing you, though.
Hi John,
Thanks for the guidance.
It is working now.
However, I still have a problem showing the category in the slide.
Below is the code I use to call out the category.
I don’t want the category to come with the link, and this is the code.
<p>
<?php
$category = get_the_category();
echo $category[0]->cat_name;
?>
</p>
Yes, I created the custom taxonomy in ACF too.
Below are the screenshots.
So you can have a brief idea of what I have done.
Thank you.
My apologies.
I checked my codes.
There is a closing quote after ‘posts_per_page’.
I think I mistyped it in the message box.
And yes, the slug is “featured”.
Please see the screenshot below.
Thank you.
Hi John,
Thanks for the reply.
I am creating and adding the category the normal way, just like when we are in “Posts”. I have a screenshot follow-up below.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.