Home Forums Plugin Support WP User Frontend Pro Differents configs por differents [wpuf_dashboard]

This topic is: resolved

This topic contains 3 replies, has 2 voices, and was last updated by  HispanicSearching 5 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9833

    HispanicSearching
    Participant
    Post count: 15

    Hi Tareq,

    I've been searching in forum but I don't see how this can be done.

    I need different config options for dashboard depending on post_type that are been displayed. The wpuf_dashboard short code accept post_type but don't accept any other argument.

    I need to show featured image, change edit options, etc for each different post_type. Can it be done ? How ? I see that setting page set this options for all dashboard but it would be better a manner to control each dashboard display/function with each edit form option or more easily with arguments to wpuf_dashboard shortcode.

    Any thought?
    thanks.

    #9836

    Mahi
    Member
    Post count: 1555

    To show different types of posts use short-code like this:

    [wpuf_dashboard post_type="post_type_name"]

    Documentation: http://docs.wedevs.com/wp-user-frontend-pro/#user-dashboard

    Sorry, currently there is not much setting options.

    However, we wrote few tutorials here – http://docs.wedevs.com/category/wp-user-frontend/

    It may helps you to achieve your goal.

    #9838

    HispanicSearching
    Participant
    Post count: 15

    Ok, so there isn't any way to have differentes options for each dasboard.

    Do you plan to add it ?

    It's easy to add as extra parameter to wpuf_dashboard, like post_type.

    Thanks.

    #9839

    HispanicSearching
    Participant
    Post count: 15

    For featured image extra option, in class/frontend-dashboard.php

    Line 25:

    
    - extract( shortcode_atts( array('post_type' => 'post'), $atts ) );
    + extract( shortcode_atts( array('post_type' => 'post', 'featured_image' => '0' ), $atts ) );
    

    Line 54:

    
    - function post_listing( $post_type ) {
    + function post_listing( $post_type, $featured_image ) {
    

    Aprox line 103:

    
    - if ( 'on' == $featured_img ) {
    + if (
    +     $featured_image == 'on' ||
    +     (!$featured_image && 'on' == $featured_img )
    + ) {
    

    Aprox line 127:

    
    - <?php if ( 'on' == $featured_img ) { ?>
    + <?php if ( $featured_image == 'on' || (!$featured_image && 'on' == $featured_img )) { ?>
    

    With this you can:

    
    [wpuf_dashboard post_type="post_type_name" featured_image="on"]
    [wpuf_dashboard post_type="post_type_name" featured_image="off"]
    
Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Differents configs por differents [wpuf_dashboard]’ is closed to new replies.