• Resolved polykrom

    (@polykrom)


    Hi all,

    It’s maybe a novice request but i can’t find an answer to this question.

    I see a lot of things that can be set up after publishing a post and get the access to $post_id but what if we don’t have that ID because the post hasn’t been published yet ?
    How to set , for example, the default Taxonomy terms ?

    ie :

    I have a navigation through the Taxonomy Terms of a custom post type and would like to have the ability to create a post in relationship to the Taxonomy Term where i’m.
    How can i set the Taxonomy term prior to publishing the post ?
    I don’t want to have to select it every time i want to create one…

    Thanks a lot

    Fran?ois

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter polykrom

    (@polykrom)

    … Have i to use hidden fields containing the related terms in a add customPost form ?

    Is it the best and only solution ?

    thanks again ??

    Thread Starter polykrom

    (@polykrom)

    Any advices ?? ?

    thx !

    Hi,

    your question is not very much clear to me, if you can explain with an example what you are trying to achieve that would be best.

    Thanks,
    Swayam

    Thread Starter polykrom

    (@polykrom)

    Hi Swayam !

    thanks a lot for your answer !

    I’m going to try to be more clear ??

    So, first, my request apply to the creation of a custom post type post in front-end.
    On my application, i can navigate through the taxonomy hierarchy of this custom post type (ie : category) .

    Imagine I’m located to the the taxonomy child term country->towns … I would be at https://www.mysite/country/towns and WP would display all the custom post posts related to this taxonomy terms …

    I would like to display on this page a form that would create a custom post type post and automatically select the right taxonomy terms …

    Is the best and only solution is to create hidden fields in this form with taxonomy terms value in it ?

    thanks a lot !

    Fran?ois

    Hey Fran?ois,

    Yes, you are right, the best way is to create hidden field with terms name or id in that and post the form, you will get terms in form post php variable, answer is in youy question itself ??

    Regards,
    Swayam

    Thread Starter polykrom

    (@polykrom)

    Ok swayam !

    Thanks a lot ??

    cheers !

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Set Post Taxonomy terms before publishing’ is closed to new replies.