Support » Theme: P2 » [Theme P2] Categories in hidden post field

  • I’m setting up P2 theme so that the post field displays in category pages.

    I can get the category id from the page and all I want to do is simply add it to the post form.

    In the post-form.php file, I’ve placed
    <input type="hidden" name="post_category" id="post_category" value="<?php echo get_category(get_query_var('cat'))->cat_ID; ?>" />

    right under this line:
    <input type="hidden" name="post_format" id="post_format" value="<?php echo esc_attr( $post_format ); ?>" />

    I can view source and verify that the post_category is indeed being set in the hidden post field, but the post is not being sent to the correct category. It just goes to the default category. Is this a nonce issue?

    Please advise! Thanks!


Viewing 1 replies (of 1 total)
  • Moderator Kathryn


    Automattic Happiness Engineer

    It sounds like you and this person both want to do something similar:

    I ran it by a couple of our developers and it looks like this sort of advanced modification is something you may want to get some custom programming for, since it’s beyond the type of basic tweaks we can help you with here. You would need to handle the processing of your new field in both functions.php and js/p2.js.

    Perhaps the two of you would like to communicate with each other and hire a freelancer together? This is one site you might want to try, or you could look for someone in one of your local WordPress communities:

Viewing 1 replies (of 1 total)
  • The topic ‘[Theme P2] Categories in hidden post field’ is closed to new replies.