Change posts category from code (on "publish post")
-
Hi guys.
On my WP magazine I am using
1. HEADLINE category (only 1 posts is showing on my home page)
2. FEATURED category (4 posts are showing on home page)
3. 10 others categories for topics that my site is dealing with (training, equipment, health, injuries….)My process
I am always SCHEDULING posts to show on HEADLINE + ONE MORE CATEGORY (TOPIC). I must come after and manually edit my old post and exclude HEADLINE category (because this posts are only showed on headline section of my magazine)Problem: What i want?
When the post is published (when schedule time happens) I want WP goes through all my published posts (better to take last published posts for speed optimization) and to exclude that posts from HEADLINE CATEGORY.Is this possible to do in functions.php?
- The topic ‘Change posts category from code (on "publish post")’ is closed to new replies.