This tag is sad, there is no answer, while the ability does exist.
Use This:
wp_set_object_terms( $object_id, $terms, $taxonomy, $append );
To set a posts category, or any other taxonomic information.
~~~~~~~~~
The above was on a single post on here many moons ago, it doesn’t mean anything too me.
I don’t know the codig but there must be a way too trigger a category change of a post once the comment count goes over 0.
<?php wp_set_object_terms( '<?php the_ID(); ?>', 'new', 'category', 'true' ); ?>
Doesnt seem to work no matter where I post it in comments.php.
I’d try the comments template but that thing scares me.
<?php get_the_ID(); ?> doesn’t work either.
`<?php if ( have_comments() ) : ?>
<?php wp_set_object_terms( ‘<?php the_ID(); ?>’, ‘new’, ‘category’, ‘true’ ); ?>
<?php endif; ?>
Isn’t working when I post it anywhere in content.php or any other template pages. I think this ones beyond me.
I’m taking a break, I’m not cut out for this lol.
If any of you have had success in the past or have seen it on a blog (ever) then let me know.
Thats me ready to take anothe rbach at this?
Do you think I need to edit the post template rather than the content.php file?
(@marketraisen2)
10 years, 7 months ago
Might sound strange but I want a section of my site thats a collection of posts people havent replied to.
There must be a way.