Free Directory, Listing & Classifieds WordPress Plugin › Support › General › HivePress › Using php to insert an ad
So I’m using my own plugin to create ads
My question is how can I use your models to attach a category to an ad ?
HivePress listings are just posts with a custom “hp_listing” type, so you can try using WordPress functions like this one https://developer.wordpress.org/reference/functions/wp_insert_post/ and https://developer.wordpress.org/reference/functions/wp_set_post_terms/ (listing category is a taxonomy of “hp_listing_category” type).
You must be logged in to reply to this topic.
Don't have an account? Register
Already have an account? Sign In
Please enter your username or email address, you will receive a link to create a new password via email.