Custom Posts are saved but not submitted to category

This topic contains 12 reply and 3 voices, and was last updated by Tareq Hasan 10 years, 5 months ago
Viewing 12 Posts - 1 through 12 (of 12 total)
Author Posts
October 17, 2013 at 11:18 pm 9151
Tareq Hasan 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, www.socication.com
October 18, 2013 at 8:16 pm 9177
Mahi Mahi

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

October 19, 2013 at 9:17 pm 9205
Bramsen Bramsen This reply has been marked as private.
October 21, 2013 at 4:48 pm 9247
Mahi Mahi

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.

October 23, 2013 at 4:26 pm 9321
Bramsen Bramsen

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
– – – – – – – – – – – – – – – – – – – – – –

October 24, 2013 at 11:57 am 9356
Tareq Hasan Tareq Hasan

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

October 24, 2013 at 3:35 pm 9382
Bramsen Bramsen

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

October 24, 2013 at 7:58 pm 9396
Tareq Hasan Tareq Hasan

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.

October 24, 2013 at 8:11 pm 9399
Bramsen Bramsen

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

October 24, 2013 at 8:48 pm 9401
Bramsen Bramsen

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!

October 24, 2013 at 10:03 pm 9402
Tareq Hasan Tareq Hasan

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

October 31, 2013 at 1:22 pm 9635
Bramsen Bramsen

Hi Tareq

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

Regards Bram

October 31, 2013 at 11:33 pm 9648
Tareq Hasan Tareq Hasan

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 12 Posts - 1 through 12 (of 12 total)