Home Forums Plugin Support WP User Frontend Pro Different Post Form for different Categories.

This topic is: resolved

This topic contains 9 replies, has 3 voices, and was last updated by  Sekander Badsha 4 years, 8 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #25732

    Roxanne
    Member
    Post count: 24

    I want to show different post form for different categories and for different post formats? How to do it?
    My theme supports post formats.

    I want to show the form in such a ways.

    Post Format: First Select it and it will display categories below.

    Category: The below post form should be displayed using AJax. Form must be dependent on category. i.e different form for different categories.

    Thanks

    #25827

    Sekander Badsha
    Member
    Post count: 2067

    Hello Roxanne,
    You can get this feature using the conditional logic. Conditional logic works with other elements. Like you can check, if Anybody selects post type “Image”, so the category would be “Gallery”.
    Give it a try and let me know the result.

    #27852

    Megan
    Member
    Post count: 6

    Hello Sekander,

    I use post type: product.
    I also want to use: Default Post Category.
    But this option doesn't show product categories, only post categories.

    Is there a way to make this work?

    Thanks!
    Megan

    #28212

    Sekander Badsha
    Member
    Post count: 2067

    Hello Megan,
    You can select post type: product and default product category in form settings. And to show product categories, you have to use “product_cat” custom taxonomy and mark it as a woocommerce attribute.

    #28254

    Megan
    Member
    Post count: 6

    Yes I understand i can select post type: product.
    But when i do this i can't set a default product category in settings. There only appear ‘post categories' to select, not product categories. I need to select a default product category….

    #28549

    Sekander Badsha
    Member
    Post count: 2067

    Please provide your login details using this form http://wedevs.com/provide-login-details/ and do not forget to mention the link of this thread.
    And please reply here
    1. the default category you want to set
    2. The form name
    3. The page you used to embed the form

    I will login to your site and set the form accordingly.
    Thank you ๐Ÿ™‚

    #28550

    Megan
    Member
    Post count: 6

    1. Default category: Golfclubs
    2. Form name: Golfclubs
    3. Page: http://golfscene.nl/golfartikelen-verkopen/advertentie-golfclubs/

    1. Default category: Diversen
    2. Form name: Diversen
    3. Page: http://golfscene.nl/golfartikelen-verkopen/advertentie-diversen/

    1. Default category: Schoenen
    2. Form name: Schoenen
    3. Page: http://golfscene.nl/golfartikelen-verkopen/advertentie-schoenen/

    Hope you can fix it! Thanks! ๐Ÿ™‚

    #28659

    Sekander Badsha
    Member
    Post count: 2067

    Hello Megan,

    I have clearly said above to use “product_cat” to display product categories. But you used the normal categories taxonomy.

    And you wanted to set a default category named Golf Clubs, but you did not have any category on that name. So I made one.

    And now your product categories are displaying fine. Please check.

    Thank you ๐Ÿ™‚

    #28660

    Megan
    Member
    Post count: 6

    Hello Sekander,

    You don't understand me, you made a POST categorie “golf clubs”, i don't want a POST categorie, i want the PRODUCT categorie set as default categorie, but i think that's impossible????

    Right now the product that people will upload with that form isn't set under the product ‘golfclubs' but under the post ‘golfclub'… you understand me?

    Thanks,
    Megan

    #28810

    Sekander Badsha
    Member
    Post count: 2067

    Hello Meagn,

    Sorry for the misunderstanding. If you want to set a WooCommerce product category as default, then you have to use the action hook and wp_set_post_category.

    You can read the following documents to get a better idea.

    http://docs.wedevs.com/action-hook-field/
    http://codex.wordpress.org/Function_Reference/wp_set_post_categories

    If you are not familiar with codes, you might consider hiring a developer.

    Thank you ๐Ÿ™‚

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Different Post Form for different Categories.’ is closed to new replies.