Home Forums Plugin Support WP User Frontend (Free Version) Custom Posts are saved but not submitted to category

This topic is: resolved

Tagged: , ,

This topic contains 12 replies, has 3 voices, and was last updated by  Tareq Hasan 5 years, 5 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #9151

    Bramsen
    Participant
    Post count: 5

    Hi,

    Using User Frontend and are very happy, have solved some pretty complex problems on our page.

    However ehen using either of the 3 forms we have running the posts are not submitted to the designated custom post category. We have to manually enter the post, set the category and update.

    Have tried some of the fixes on the forum but cannot locate the said code to modify.

    Regards Bram Andersen, http://www.socication.com

    #9177

    Mahi
    Member
    Post count: 1555

    possible to share admin login details to check your form settings? reply as private.

    #9205

    Bramsen
    Participant
    Post count: 5
    This reply has been marked as private.
    #9247

    Mahi
    Member
    Post count: 1555

    Hello,

    Sorry for late reply. I just checked. Your categories are not default categories they are custom taxonomy, so you have to add them on form.

    I address a test one for school form. check that.

    #9321

    Bramsen
    Participant
    Post count: 5

    Hi again

    Tested the new form, selected school. Still is not visible after submitting, have to update the post in the backend. Suggestions?

    Venlig hilsen | Best regards

    Bram Alexander Andersen
    Arkitekt MAA

    – – – – – – – – – – – – – – – – – – – – – –
    road: Bådehavngade 55m
    2450 København SV
    mail: bram.andersen@icloud.com
    mobil: +45 21780969
    web: http://www.bramandersen.dk
    skype: bramandersen
    linkedIn: bramandersen
    twitter: bramandersen
    pinterest: bramandersen
    – – – – – – – – – – – – – – – – – – – – – –

    #9356

    Tareq Hasan
    Keymaster
    Post count: 2831

    In wpuf.php line 229, replace the wp_die() line with this one:
    [php]wp_redirect( home_url() ); exit;[/php]

    #9382

    Bramsen
    Participant
    Post count: 5

    Hi Tareq

    Thanks for your reply, have applied the code but can't see any difference? Posts still do not show up when submitted, using Coda and checked in the WP editor.

    Do I have to reload something? Cache?

    Regards Bram

    #9396

    Tareq Hasan
    Keymaster
    Post count: 2831

    Sorry Bram, I posted in a wrong thread.

    As @mahi already gave you the answer, it's a custom post type. As your custom post type doesn't support the post_category taxonomy, so it doesn't show up in that category.

    #9399

    Bramsen
    Participant
    Post count: 5

    Hm, so no solution to this – a shame since this must be a pretty normal feature.

    Any suggestions? Is it dooable in any way to place it in the correct category even without wp support.

    Besides this we have some other smaller adjustments we're looking for a developer to do, is this in your expertise?

    Regards

    #9401

    Bramsen
    Participant
    Post count: 5

    Ok seems someone has the answer:

    Seems post_category is outdated, wp_set_post_terms should work

    http://wordpress.org/support/topic/problem-with-wp_insert_post-for-custom-post-type-category-is-not-associated

    Can you integrate in plugin? Massive feature request!

    #9402

    Tareq Hasan
    Keymaster
    Post count: 2831

    This is not complicated, just add support for category taxonomy to your custom post type like this:
    [php]register_post_type( ‘entry', array(
    ‘taxonomies' => array( ‘category' )
    ) );[/php]

    Then you'll be able to assign default categories. So replace your custom taxonomy for category with the default category

    #9635

    Bramsen
    Participant
    Post count: 5

    Hi Tareq

    Many thanks for the input 🙂 Can't locate where to put the code though, taxonomy.php?

    Regards Bram

    #9648

    Tareq Hasan
    Keymaster
    Post count: 2831

    To add category support to that custom post type, you've to change your code that way given in example. Find out where the theme/plugin added that custom post type and make changes. I don't know where.

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

The topic ‘Custom Posts are saved but not submitted to category’ is closed to new replies.