WordPress.org

Ready to get started?Download WordPress

Forums

WP User Frontend
Custom Post Type (11 posts)

  1. dylanseeger
    Member
    Posted 2 years ago #

    How does one set the post type to be a custom post type (ex: portfolio).

    Thanks!

    Dylan

    http://wordpress.org/extend/plugins/wp-user-frontend/

  2. Tareq Hasan
    Member
    Plugin Author

    Posted 2 years ago #

    for adding a custom post type post, use the shortcode [wpuf_addpost post_type="portfolio"].

    Similarly for dashboard [wpuf_dashboard post_type="portfolio"]

  3. dylanseeger
    Member
    Posted 2 years ago #

    Awesome!!! Thank you!

  4. zedjasper
    Member
    Posted 2 years ago #

    Great plugin!

    How do I allow non-logged in users to post?

  5. skinnytires
    Member
    Posted 2 years ago #

    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!

  6. skinnytires
    Member
    Posted 2 years ago #

    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!

  7. Tareq Hasan
    Member
    Plugin Author

    Posted 2 years ago #

    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"]

    changelog

  8. Max
    Member
    Posted 1 year ago #

    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?

  9. Tareq Hasan
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry, custom taxonomies are not supported that way yet. Only custom post type can be assigned right now.

  10. ersaldivar
    Member
    Posted 1 year ago #

    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"?

  11. Tran Dinh Khanh
    Member
    Posted 1 year ago #

    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 add wpuf_category_checklist($tax = $taxonomy);

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic