WordPress.org

Ready to get started?Download WordPress

Forums

[closed] How to echo category selection? (1 post)

  1. kaylamatthews
    Member
    Posted 3 years ago #

    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 is here on pastebin

    The function in function.php for the AJAX menu looks like this on pastebin

    And finally, the code I am using to call out the result of the category selection is:

    <?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 :'(

    Thanks!
    Kayla

    [duplicate: http://wordpress.org/support/topic/how-to-echo-category-selection-1?replies=1#post-2175191
    please start only one topic per problem; and continue with your orignal thread. topic closed]

Topic Closed

This topic has been closed to new replies.

About this Topic