• Resolved kkriss

    (@kkriss)


    Hello.
    I’m trying to use your plugin for my needs but something is not working for me. What I’m trying to reach is quite normal but probably I am making some big settings mistakes:
    1) New registered users can submit custom posts (recipes) through a frontend form (done):
    2) Clicking on each user in the UM members page, I want to reach the single user profile (done);
    3) In the user profile, tab Posts, I would display the post list of recipes added by the single author.
    4) All the users (registered or not) could see a single author profile.
    5) The posts list should include both WP posts and CPT.
    6) The list should be created through an Elementor Pro archive template.
    Actually I only can see WP posts list that only one author posted , the other authors post only CPT.
    How to get points 3-4-5-6?
    Thanks

Viewing 8 replies - 16 through 23 (of 23 total)
  • Thread Starter kkriss

    (@kkriss)

    “This way you get a list of posts that lists both types of post and recipe at the same time”
    I already solved that problem with the code @champsupertramp sent me.
    The only thing to improve now is the posts list layout in one of the two ways:
    1) some css rules to improve what I already did;
    2) with UM setting new feature or with a brand-new add-on for UM. I can’t do nothing more as I’m not able to. This second one should be perfect and I do hope it will be created.
    Thanks

    Thread Starter kkriss

    (@kkriss)

    Hello @sqkkyzx
    I will try to clear my actual situation, our messages crossed, so there’s a bit of confusion.
    I added the following code @champsupertramp suggested me to make a list including both WP posts and a custom post type (recipe in my case) of the same author, one of the author chosen from the members page, as I don’t want to show ONLY the current users, like you, but the profile is public.

    add_filter(“um_profile_query_make_posts”,”um_custom_profile_query_make_posts”);
    function um_custom_profile_query_make_posts( $args ){

    $args[‘post_type’] = array(
    ‘post’,
    ‘recipe’
    );
    return $args;

    }

    This works perfectly, now I need to implement to this code the way you told me will work for showing the post lists through an Elementor template. Don’t know how to set the widget in the Elementor widget query source that allows only one post type.
    Could you suggest me how to add some code to that I’m already using to get this?
    Thanks.

    • This reply was modified 4 years, 3 months ago by kkriss.

    @kkriss

    I also have some confusion. I have been trying my best to introduce you to my current plan. But since I am using translation software to communicate with you, I am not sure whether your needs and mine are really consistent. I just guess what you want to achieve by browsing the webpage you provided.

    Now, I will show you in detail how to switch from the current solution to my implementation method, and can try it on the basis of “keep everything you have now” without deleting the added code and CSS, If you are willing to try, please follow Do the steps I provide, don’t think too much about why, and then check if it is what you want.

    Make sure you use Elementor Pro!

    Start now:

    1. Create a new page, Named Test Members Page, Then close it without editing for now.

    2. In Ultimate Member – Settings > General > page > Members page, Select the page Test Members Page you just created.

    3. In Ultimate Member – Settings > appearance > profile menu > Enable profile menu, Disable this.

    4. Add this code in the theme’s function.php:(Confirm that ‘post’ and ‘recipe’ in the code are the post types you need, if not, replace them)

    add_action( ‘elementor/query/my_custom_filter_1’, function( $query ) {
    global $current_user;
    $query->set( ‘post_type’, [ ‘post’, ‘recipe’] );
    $query->set( ‘author’, um_profile_id() );
    } );

    5. Use Elementor to edit page Test User Page

    6. On this page, add Shortcode Widget, Fill in [ultimatemember form_id=”7″](This should be replaced with the shortcode of your user configuration form)

    7. On this page, add Posts Widget (Pro), Edit this widget in Content>Query>Query ID
    Fill in my_custom_filter_1 in the content box of Query ID

    8. Edit Posts Widget (Pro) in Content>Layout, until you get a layout you are satisfied with, Save and exit the page.

    9. Check Ultimate Member-Settings> appearance> profile menu> Automatically redirect author page to their profile? make sure to allow.

    10. Done. Take a look at the page and if you are not satisfied, delete it. And restore the previously modified UM options.

    If these are of no use to you, I am sorry I can’t help you more. I’m not a developer and I don’t know how to build code. I just try to use the plugins I can find.

    Thread Starter kkriss

    (@kkriss)

    @sqkkyzx
    I reproduced all your suggestions, but don’t understand the point no. 9, see the screenshot here
    If you have no time to reply me, don’t worry, thank you for your help.

    @kkriss
    Sorry, there is a small error, the correct one can be found below

    9. Check Ultimate Member-Settings> general > users> Automatically redirect author page to their profile? make sure to allow.

    • This reply was modified 4 years, 3 months ago by sqkkyzx.
    Thread Starter kkriss

    (@kkriss)

    @sqkkyzx
    Sorry, but it didn’t work ??
    I came back to what I did before and styled it at my best. Not perfect,I still have to improve the title style and the image size (sometimes it is squared and sometimes is 4:3 ratio, the one I prefer). Hope I can change those, but not sure ?? In the meantime I hope the plugin author will realize a premium add-on for using easily Elementor templates for styling Ultimate Member pages making a very useful Christmas gift for all of us ??
    Thanks

    • This reply was modified 4 years, 3 months ago by kkriss.
    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hey there!

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Single profile layout’ is closed to new replies.