[Plugin: WP User Frontend] Custom Post Type
-
How does one set the post type to be a custom post type (ex: portfolio).
Thanks!
Dylan
-
for adding a custom post type post, use the shortcode [wpuf_addpost post_type=”portfolio”].
Similarly for dashboard [wpuf_dashboard post_type=”portfolio”]
Awesome!!! Thank you!
Great plugin!
How do I allow non-logged in users to post?
Tareq, you also have a “Show Post Type” select menu in the admin that says: “Select the post type that the user will see in the dashboard” — though no matter what I do, it never recognizes custom post types — only displays “post” or “page.”
+ As a test, if I call wpuf_get_post_types() I can get all custom post types that I have created, A-OK.
+ However, when wpuf-admin.php calls “global $wpuf_options” which calls info from wpuf-value-options.php (which contains the call to wpuf_get_post_types()), it never recognizes custom post types…Am I missing something? A process chronology issue? Something to do with when WP initializes the global values?
+ Also, I see a changelog for 0.6 but not latest 0.7?
Thanks much Tareq!
Actually, I just added a hack to wpuf_options_value.php as the “select” case is writing the Select html:
<?php /* Hack to properly expose the full list of Custom Post Types * Note: the original method of calling wpuf_get_post_types() earlier in the process via * the global $wpuf_options variable does not produce the full, acurate list of Custom Post Types */ if ( $element['name'] == 'wpuf_list_post_type' ) { $element['options'] = wpuf_get_post_types(); } ?>
Hope this helps!
Yes, maybe the function is being called before registering the post types.
BTW, you can show the dashboard like this
[wpuf_dashboard post_types="events"]
Thank you! Tareq
I have assigned the Post Type to ‘portfolio’. Which all works fine.
BUT The Categories drop down still shows the ‘posts’ categories and not the portfolio-types
How can I change this?
Sorry, custom taxonomies are not supported that way yet. Only custom post type can be assigned right now.
This may not be related, but:
I would like for the submissions NOT to be posted in the “post” section or “pages” section of my WP.
On my site; I have a Game Reviews section where I post different reviews.
Could I have it submit to this section, instead of the “Posts”?
To show custom taxonomy, I just hacked some code.
In wpuf-add-post.php, line 112, I modified like this (and it worked well).$taxonomy =''; if($post_type=="place"){ $taxonomy ="places"; } else $taxonomy = "category"; if ( $cat_type == 'normal' ) { wp_dropdown_categories( 'show_option_none=' . __( '-- Select --', 'wpuf' ) . '&hierarchical=1&hide_empty=0&orderby=name&name=category[]&id=cat&show_count=0&title_li=&use_desc_for_title=1&class=cat requiredField&exclude=' . $exclude.'&taxonomy='.$taxonomy ); } else if ( $cat_type == 'ajax' ) { wp_dropdown_categories( 'show_option_none=' . __( '-- Select --', 'wpuf' ) . '&hierarchical=1&hide_empty=0&orderby=name&name=category[]&id=cat-ajax&show_count=0&title_li=&use_desc_for_title=1&class=cat requiredField&depth=1&exclude=' . $exclude.'&taxonomy='.$taxonomy );
with
place
is custom post_type,places
is custom taxonomy.If you use
wpuf_category_checklist
function, just addwpuf_category_checklist($tax = $taxonomy);
Thanks.
- The topic ‘[Plugin: WP User Frontend] Custom Post Type’ is closed to new replies.