How to echo category selection?
I have a posting system on my WordPress by which users can select categories from two drop-down menus – first drop-down being top level category, and second drop-down being sub-categories for the selected top level category.
My question right now is that the posts are not being categorized correctly at all. They keep getting put into the first top level category in the top level category list. I think the issue lies in my inability to call out the result of the selected category effectively.
The HTML <select> form looks like the following in the adding-post php page:
The function in function.php for the AJAX menu looks like this:
And finally, the code I am using to call out the result of the category selection is:
[please use the ‘code’ button to mark any code posted directly]
<?php echo ($_POST['form']['sub_cat']); ?>
If anybody can offer any help that would be really great! I have been studying this for over 3 days :'(
- The topic ‘How to echo category selection?’ is closed to new replies.