Saving two categories from two dropdowns in front end posting form

To fix this you will need to pass in multiple terms rather than a single term

so instead of:

$_POST['main_cat']

Use:

array($_POST['main_cat'],$_POST['sub_cat'])

You shouldn’t need to save main_cat though. Assigning sub_cat should imply it’s also in subcat’s parent term

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)