ninsan
Forum Replies Created
-
UPDATE.
It occurred to me that aside from the default Login form I also use the UM Gutenberg blocks to display the default Profile form in the post. When I remove the profile form and display only the login form, the problem goes away.
So it would seem there is some kind of conflict happening if you try to embed both forms within a single post.This makes sense as, when the user is logged out, obviously there is no profile to display for the current user. Ideally, though, I would like to be able to display both forms in the same post, perhaps by tweaking the code for the profile form so that it is not displayed or displays a “dummy profile” when the user is logged out. Is there any way this can be done?/jenny
- This reply was modified 3 years, 6 months ago by ninsan.
Hi @aswingiri
Thank you for helping. ?? I did as you suggested and checked that the post doesn’t have any content restrictions applied to it and that ‘apply custom settings’ is set to ‘no’ for the login form – this is indeed the case.
I also deactivated all other plugins (except UM), removed my mu-plugins directory and switched to the default Twenty Twenty-One theme – the problem still remains.
As of right now, I am stumped as to why this occurs. Have you tried replicating the issue on your end?
Thanks.
/jenny
Hello @aswingiri and @missveronicatv
I apologize for not getting back to you sooner as I have been away on holiday. I just wanted to thank you for taking the time to try to help me and to let you know that I found a solution to my problem. I’m posting it here in case anyone else runs into the same issue:
To change the default location of custom templates intended to override default/builtin profile templates (e.g. profile/posts-single.php), you need to place the following code in a mu-file or your theme’s functions.php file:
add_filter('um_get_template', 'my_um_custom_templates_location', 10, 4); function my_um_custom_templates_location($located, $template_name, $path, $t_args) { if ($template_name === 'profile/posts-single.php') { // Note that dirname(__FILE__) returns the absolute path to the directory of // the currently running script $located = dirname( __FILE__ ) . '/ultimate-member/templates/profile/posts-single.php'; } return $located; }
To specify the path to a custom template that is NOT intended to override any of the builtin/default profile templates, you need to include() the path to the template file inside a function, then add this function as a callback to the ‘um_profile_content_{$nav}‘ filter hook. For instance, I have a custom post type ‘text’ that I want to display in a custom ‘texts’ tab in users’ profiles:
add_action('um_profile_content_texts', 'my_um_profile_content_texts'); function my_um_profile_content_texts($args) { // define text args $text_args = array( 'author' => um_profile_id(), 'post_type' => 'text', 'post_status' => 'publish', 'numberposts' => -1, //all texts ); // get the texts $texts = get_posts($text_args); if (!empty($texts)) { foreach ($texts as $text) { include(dirname(__FILE__) . '/ultimate-member/templates/profile/texts-single.php'); } } }
For instructions on how to create/add custom tabs in user profiles, see here: https://docs.ultimatemember.com/article/69-how-do-i-add-my-extra-tabs-to-user-profiles
/jenny
Forum: Plugins
In reply to: [Font Awesome] Does this plugin collect any personal information?Thank you for your detailed explanation, I really appreciate it. ?? It should be more than enough to answer any questions raised by my managers.
Cheers!
/jenny
Forum: Plugins
In reply to: [Default Featured Image] Does this plugin collect any personal information?Hi Jan-Willem,
You’re right, the question is a bit silly. ?? Even so, I appreciate that you took the time to reply with a straight answer. I won’t be needing anything else for now.
Cheers!
/jenny
Forum: Plugins
In reply to: [Imsanity] Does this plugin collect any personal information?Thank you! ??
/jenny
Thank you! ??
/jenny
Forum: Developing with WordPress
In reply to: “Blank square” dashicons on front endThat did the trick! You sure know your way around google, George. ?? Thank you so much!
/jenny
Forum: Developing with WordPress
In reply to: “Blank square” dashicons on front endHi George, thanks for helping. ?? I have a staging version of the website here:
https://skrivarverkstan.great-site.net/
Scroll down to the footer and you’ll find a link with my name (“Jenny Rigsj?”) and a broken dashicon next to it.
/jenny
Thanks, that worked! ??
In case anyone reading this wonders how to do this manually, run the following SQL query on your database to update the urls of WPUM avatars:
UPDATE wp_usermeta SET meta_value = REPLACE(meta_value, ‘olddomainname.com’, ‘newdomainname.com’) WHERE meta_key = ‘current_user_avatar’;
And to update urls of WPUM cover images:
UPDATE wp_usermeta SET meta_value = REPLACE(meta_value, ‘olddomainname.com’, ‘newdomainname.com’) WHERE meta_key = ‘user_cover’;
Remember to make a backup/export a copy of your database first!
/jenny
- This reply was modified 3 years, 10 months ago by ninsan.
Thank you, will do. ??
Thanks, I have emailed you the link now. ??
@alanfuller You’re welcome and thank you again! ??
Forum: Developing with WordPress
In reply to: Dashboard Quick Draft widget for custom post type?Just popping by to mark this as “resolved” in keeping with forum guidelines…
I’m marking this as resolved in keeping with forum guidelines. Thanks again to @corrinarusso for helping. ??