neoset
Forum Replies Created
-
I think profile photo and cover photo should be added to the core for forms, or at least left as meta key reserved for Image Upload as well as display_name.
It would be an interesting addition.Greetings and thank you.
- This reply was modified 2 years, 5 months ago by neoset.
Forum: Plugins
In reply to: [Complianz - GDPR/CCPA Cookie Consent] Disable WP Google Map Plugin BlockingI’m going to do some tests with a clean wordpress, it may be some error of another plugin.
I have done a quick test and the error has not been replicated and the integration works perfectly, even so I will test the plugin thoroughly and tell you.
Thank you very much for your time.Solved, it works perfect, you are the only ones who solve this type of problem in record time.
Greetings and many thanks for the best plugin and especially for the best team.
I will never get tired of saying that you are the best.Forum: Plugins
In reply to: [Complianz - GDPR/CCPA Cookie Consent] Disable WP Google Map Plugin BlockingAfter several tests and deactivating the plugins one by one, I have discovered that the code that causes the disappearance of the Wp google maps map (it has integration since the Complianz plugin indicates it to me) combined with the Complianz plugin is the creation of this CPT:
function cptui_register_my_cpts_aviso() { /** * Post Type: Avisos. */ $labels = [ "name" => __( "Avisos", "hello-elementor" ), "singular_name" => __( "Aviso", "hello-elementor" ), "menu_name" => __( "Mi Avisos", "hello-elementor" ), "all_items" => __( "Todos los Avisos", "hello-elementor" ), "add_new" => __( "A?adir nuevo", "hello-elementor" ), "add_new_item" => __( "A?adir nuevo Aviso", "hello-elementor" ), "edit_item" => __( "Editar Aviso", "hello-elementor" ), "new_item" => __( "Nuevo Aviso", "hello-elementor" ), "view_item" => __( "Ver Aviso", "hello-elementor" ), "view_items" => __( "Ver Avisos", "hello-elementor" ), "search_items" => __( "Buscar Avisos", "hello-elementor" ), "not_found" => __( "No se ha encontrado Avisos", "hello-elementor" ), "not_found_in_trash" => __( "No se han encontrado Avisos en la papelera", "hello-elementor" ), "parent" => __( "Aviso superior", "hello-elementor" ), "featured_image" => __( "Imagen destacada para Aviso", "hello-elementor" ), "set_featured_image" => __( "Establece una imagen destacada para Aviso", "hello-elementor" ), "remove_featured_image" => __( "Eliminar la imagen destacada de Aviso", "hello-elementor" ), "use_featured_image" => __( "Usar como imagen destacada de Aviso", "hello-elementor" ), "archives" => __( "Archivos de Aviso", "hello-elementor" ), "insert_into_item" => __( "Insertar en Aviso", "hello-elementor" ), "uploaded_to_this_item" => __( "Subir a Aviso", "hello-elementor" ), "filter_items_list" => __( "Filtrar la lista de Avisos", "hello-elementor" ), "items_list_navigation" => __( "Navegación de la lista de Avisos", "hello-elementor" ), "items_list" => __( "Lista de Avisos", "hello-elementor" ), "attributes" => __( "Atributos de Avisos", "hello-elementor" ), "name_admin_bar" => __( "Aviso", "hello-elementor" ), "item_published" => __( "Aviso publicado", "hello-elementor" ), "item_published_privately" => __( "Aviso publicado como privado.", "hello-elementor" ), "item_reverted_to_draft" => __( "Aviso devuelto a borrador.", "hello-elementor" ), "item_scheduled" => __( "Aviso programado", "hello-elementor" ), "item_updated" => __( "Aviso actualizado.", "hello-elementor" ), "parent_item_colon" => __( "Aviso superior", "hello-elementor" ), ]; $args = [ "label" => __( "Avisos", "hello-elementor" ), "labels" => $labels, "description" => "", "public" => true, "publicly_queryable" => true, "show_ui" => true, "show_in_rest" => true, "rest_base" => "", "rest_controller_class" => "WP_REST_Posts_Controller", "rest_namespace" => "wp/v2", "has_archive" => false, "show_in_menu" => true, "show_in_nav_menus" => true, "delete_with_user" => false, "exclude_from_search" => false, "capability_type" => "post", "map_meta_cap" => true, "hierarchical" => false, "can_export" => false, "rewrite" => [ "slug" => "aviso", "with_front" => true ], "query_var" => true, "menu_icon" => "dashicons-megaphone", "supports" => [ "title", "editor", "thumbnail", "author" ], "show_in_graphql" => false, ]; register_post_type( "aviso", $args ); } add_action( 'init', 'cptui_register_my_cpts_aviso' );
There is something in this code that makes the integration not work, if I delete it it works perfectly and disables the blocking of the map as I want but if I add this code to the Code snippets, it makes the map disappear when I block the cookies and that’s it that I don’t want, that even if I block them, they don’t disappear.
In short, in this code there is something that makes the integration to deactivate the blocking of the Wp google maps map not work.Here I leave the images:
Also comment that the maximum size in bytes of the new field created in the builder does not work either, but that is another topic without much importance since it is controlled by the Ultimate Member settings, I comment it so that nothing else is known.
Thank you very much as always you are the best with one of the best plugins on the market, light and with many possibilities.
This is the code I got and it worked for me:
add_shortcode( 'um_cpt_orders', function () { $profile_id = um_profile_id(); $args = array( 'post_type' => array('orders'), 'post_status' => array('publish'), 'posts_per_page' => 6, 'author' => $profile_id ); $the_query = new WP_Query( $args ); ob_start(); if ( $the_query->have_posts() ) { echo '<ul>'; while ( $the_query->have_posts() ) { $the_query->the_post(); echo '<li>' . get_the_title() . '</li>'; } echo '</ul>'; } else { echo 'No orders found'; } wp_reset_postdata(); $contents = ob_get_contents(); ob_end_clean(); return $contents; } );
How could I also do it with pagination with previous and next numbers?
The functionget_the_post_navigation()
shows the previous and next page and sends me to the posts, but it doesn’t show the numbering of the pages and that’s what I need when I define'posts_per_page' => 6
Thank you very much and greetings.
In the end we have come to the same conclusions, yesterday at the last minute I was reviewing the hooks in the JetFormBuilder documentation and I had also thought about changing the email field through javascript.
The function that I have used to get the email from the profile in members from any type of user is:
get_the_author_meta('user_email', um_profile_id());
I will try these solutions, a greeting and thanks.
Thank you very much, it works for me although when there is a value with name and surname and one of the two fields is empty, wordpress by default removes the user pasted without spaces to the field that is full and that cannot be controlled since wordpress does it.
Even so, it has served me with having the mandatory fields, there would be no problem.
Thank you and greetings.This is the code that I enter either in mu-plugins/my-functions.php or in code snippets:
function display_name_list_dropdown() { $displayname = array( um_user( 'nickname' ) => um_user( 'nickname' ), um_user( 'first_name' ) => um_user( 'first_name' ), um_user( 'last_name' ) => um_user( 'last_name' ), um_user( 'first_name' )." ".um_user( 'last_name' ) => um_user( 'first_name' )." ".um_user( 'last_name' ), um_user( 'last_name' )." ".um_user( 'first_name' ) => um_user( 'last_name' )." ".um_user( 'first_name' ), um_user( 'business' ) => um_user( 'business' ), um_user( 'first_name' )." | ".um_user( 'empresa' ) => um_user( 'first_name' )." | ".um_user( 'business' ), um_user( 'empresa' )." | ".um_user( 'first_name' ) => um_user( 'business' )." | ".um_user( 'first_name' ) ); return $displayname; }
This is the dropdown field with the options and the display_name_list_dropdown function:
This is the result on the frontend:
but if we do not fill fields they are shown empty and that is the problem since the empty fields should not be shown:
Thanks for the help.
That theme that you have Storefront is generating a CSS that causes it to take the width of the container 100%, you fix that with a bit of css, try this and you will see how it is fixed:
@media (min-width: 768px) .storefront-full-width-content .content-area { width: 450px; float:none; margin: auto; }
If it still doesn’t change force it with !important, delete the previous one and try this one:
@media (min-width: 768px) .storefront-full-width-content .content-area { width: 450px !important; float: none !important; margin: auto !important; }
Let me know if it worked for you.
Hope that helps, best regards.Here I leave some images:
This is the image of the fields with information:This is the image of some fields with information:
The fields without information and with the bar | They should not appear in the dropdown.
What would be the code so that only the fields with information appear in the dropdown?
Thank you very much for your help.- This reply was modified 2 years, 9 months ago by neoset.
If you mean the login form go to forms/login form/customize this form and change the maximum width.
If you refer to the account or profile is settings/appearance you find all the necessary settings.
for everything else CSS.
All the best.- This reply was modified 2 years, 9 months ago by neoset.
If I had it in both.
In the end that code worked for me in the registry but not in the profile but well, I managed to solve it thanks to your examples, the function I was looking for from the beginning was
um_user( 'user_login' )
since I had tried with$userum->user_login
but value did not enter.
In the end, the code looks like this:add_action('um_submit_form_errors_hook_', 'um_custom_validate_username_nickname', 999, 1); function um_custom_validate_username_nickname( $args ) { $user_login = um_user( 'user_login' ); if ( isset( $user_login ) && isset( $args['nickname'] ) && $user_login == $args['nickname'] || isset( $args['user_login'] ) && isset( $args['nickname'] ) && $args['user_login'] == $args['nickname'] ) { UM()->form()->add_error( 'nickname', 'Your username and nickname can not be equal.' ); } }
This solution works in both places at the same time, both in the registry and in the profile, I know that the code can be reduced even more, but this way I make sure that strange things do not happen with the logical operators.
Thank you very much for all your help, the resolution of the problem and the speed of response are impressive, thanks for the time you have dedicated.
A huge greeting.