Forum Replies Created

Viewing 15 replies - 61 through 75 (of 79 total)
  • Thread Starter chihi108

    (@chihi108)

    resolved

    Thread Starter chihi108

    (@chihi108)

    working now
    thanks

    Thread Starter chihi108

    (@chihi108)

    I paste the function.php file from the child theme here but basically the line in the code starting from // Filter
    function um_add_custom_tabs( $tabs ) {

    downward does not reflect in the front end whereas it works OK with the Main theme,
    The full codes are as below. If there is a direct link to child theme then I can also try that

    <?php
    /**
     * GeneratePress child theme functions and definitions.
     *
     * Add your custom PHP in this file. 
     * Only edit this file if you have direct access to it on your server (to fix errors if they happen).
     */
    
    function generatepress_child_enqueue_scripts() {
    	if ( is_rtl() ) {
    		wp_enqueue_style( 'generatepress-rtl', trailingslashit( get_template_directory_uri() ) . 'rtl.css' );
    	}
    }
    add_action( 'wp_enqueue_scripts', 'generatepress_child_enqueue_scripts', 100 );
    /** Code for default Country Phone field Caldera Form **/
    add_filter( 'caldera_forms_phone_js_options', function( $options){
    	//Use ISO_3166-1_alpha-2 formatted country code
    	$options[ 'initialCountry' ] = 'GB';
    	return $options;
    });
    // Filter
    function um_add_custom_tabs( $tabs ) {
        $tabs['profile'] = array(
            'name' => 'Edit Profile',
            'icon' => 'um-faicon-pencil',
            'custom' => TRUE
        );
    
        return $tabs;
    }
    add_filter( 'um_profile_tabs', 'um_add_custom_tabs', 1000 );
    
    // Action
    
    function um_profile_content_profile_default( $args ) {
        wp_redirect( "/ultimate/user/?um_action=edit" );
    }
    add_action( 'um_profile_content_profile_default', 'um_profile_content_profile_default' );
    
    function custom_um_logout_add_tab( $tabs ) {
    
    	$tabs[ 'logout' ] = array(
    		'name'   => 'Logout',
    		'icon'   => 'um-faicon-sign-out',
    		'custom' => true
    	);
    
    	UM()->options()->options[ 'profile_tab_' . 'logout' ] = true;
    
    	return $tabs;
    }
    add_filter( 'um_profile_tabs', 'custom_um_logout_add_tab', 1000 );
    function custom_um_logout_action() {
    	if ( isset( $_GET['profiletab'] ) && 'logout' == $_GET['profiletab'] ) {
    		// Logout user
    		wp_logout();
    
    		// redirect to home page.
    		wp_redirect( home_url() );
    		exit;
    	}
    
    	if ( isset( $_GET['profiletab'] ) && 'account' == $_GET['profiletab'] && function_exists( 'um_get_core_page' ) ) {
    		$account_page = um_get_core_page( 'account' );
    		if ( $account_page ) {
    			// redirect to home page.
    			wp_redirect( $account_page );
    			exit;
    		}
    	}
    }
    add_action( 'template_redirect', 'custom_um_logout_action' );
    
    /* add new tab called "mytab" */
    
    add_filter('um_account_page_default_tabs_hook', 'my_custom_tab_in_um', 100 );
    function my_custom_tab_in_um( $tabs ) {
    	$tabs[800]['mytab']['icon'] = 'um-faicon-pencil';
    	$tabs[800]['mytab']['title'] = 'My Profile';
    	$tabs[800]['mytab']['custom'] = true;
    	return $tabs;
    }
    	
    /* make our new tab hookable */
    
    add_action('um_account_tab__mytab', 'um_account_tab__mytab');
    function um_account_tab__mytab( $info ) {
    	global $ultimatemember;
    	extract( $info );
    
    	$output = $ultimatemember->account->get_tab_output('mytab');
    	if ( $output ) { echo $output; }
    }
    
    /* Finally we add some content in the tab */
    
    add_filter('um_account_content_hook_mytab', 'um_account_content_hook_mytab');
    function um_account_content_hook_mytab( $output ){
    	ob_start();
    	?>
    		
    	<div class="um-field">
    		
    	Go to my Profile Page 	<a href="https://www.gbscuk.co.uk/user/" class="um-button button primary">Your Profile Page</a>
    		
    	</div>		
    		
    	<?php
    		
    	$output .= ob_get_contents();
    	ob_end_clean();
    	return $output;
    }
    Thread Starter chihi108

    (@chihi108)

    Can you please advice that in the logout button on the profile tab, if instead of directing the person to home page after logging out, what change should be done in the code and where so that I can adjust it to redirect to another url.

    Also are you the author for the meet me plugin and will you be able to offer support for that which we may be looking to buy

    Thread Starter chihi108

    (@chihi108)

    Brilliant !!
    Works nicely

    Thread Starter chihi108

    (@chihi108)

    Thanks again, I think the first 2 codes (1 for the Tab and second one for the User Log out) are functioning properly. So may be I can keep that codes? and not change them to the third code which have sent?

    Also please advice how can we add My Account tab to the profile Menu Bar please so that when clicked it takes to the accounts page for example https://mywebsite.com/account/

    Thread Starter chihi108

    (@chihi108)

    Sorry, I figured out the settings after my previous query, so thank you again.

    If I wish to add ‘My Account’ tab on the Profile Menu Bar, will I have to use a different code? With your above Log Out code, the Profile Menu Bar and having arranged the icons/tabs in order, and who can see which Tab (like anyone, User only, Member) it has made the Profile Bar to look much more meaningful.

    Hope you are able to shed some light on the My Accounts tab as well, sorry to ask but really appreciate what all you have done, Sure it will help others too in the forum.

    Thread Starter chihi108

    (@chihi108)

    Works flawlessly ?? That’s WONDERFUL

    Sorry, I figured out the settings after my previous query, so thank you again.
    
    If I wish to add 'My Account' tab on the Profile Menu Bar, will I have to use a different code? With your above Log Out code, the Profile Menu Bar and having arranged the icons/tabs in order, and who can see which Tab (like anyone, User only, Member) it has made the Profile Bar to look much more meaningful.
    
    Hope you are able to shed some light on the My Accounts tab as well, sorry to ask but really appreciate what all you have done, Sure it will help others too in the forum.
    • This reply was modified 3 years, 8 months ago by chihi108.
    Thread Starter chihi108

    (@chihi108)

    I would need some help. I have tried to integrate woo-commerce plugin to test like a membership/subscription site. However while doing a trial test of 1 day membership, when I signup as a new member then I can in the backend All Users > i am added as Customer and also as a Member. Customer because woocommerce makes everyone as a customer.
    Problem: When I signin with my details in the account UM in the front end, I can see my profile but the cogwheel will not show me the option of ‘edit profile’.
    If I go back to backend and All Users > change my role from Customer to Member, and then go to front end then I can see edit profile tab in cogwheel.
    So how can I avoid being added as Customer and also as a Member, to avoid being added as a Customer. May be some setting?
    Please advice Thanks for the help

    Thread Starter chihi108

    (@chihi108)

    Also I was interested to see if I can make few more fields to appear on the Members Directory page like Place, Gender, Occupation, Interest.

    Thread Starter chihi108

    (@chihi108)

    Hi, I finally figured it out working. However, rather than headless profile form I would like the photo section and profile tabs, but wanted to add additional tabs to the black profile strip, Edit Profile, Log Out as currently they are hidden under cogwheel which not many people will see. Any solution that they can be placed on the profile menu?

    Thread Starter chihi108

    (@chihi108)

    Thats amazing and appreciate your reply ??
    However I created successfully the headless profile file in the theme directory (using Hello Elementor theme), but and in fron end I chose Customise Edit Profile form to YES, but then in the template section it is still showing me the default form. So I could not select the headless profile form as mentioned in the link
    5. In the “Template”, select “Headless Profile”. Click on “Update/Save” – And that’s it!
    May be something I may have missed. Any chance

    Thread Starter chihi108

    (@chihi108)

    Thanks a lot, but the problems seems to have now sorted after chaging the settings in the first section and allowing all. Regards

    Thread Starter chihi108

    (@chihi108)

    HI Leo I tried to add some text in the Footer 1 section by Appearance > Widgets > Footer 1 and adding HTML text to it. You can see this at https://gbscukco.uk3.fcomet.com/.
    I would like to make it visually more appealing as it is just a bland text. I do not know the coding or CSS. Can you please advice how to add a background colour, Buttons etc? Is there no video or training guide on designing the Footer in Generatepress for people who do not know CSS or coding? It would be helpful. Hence the reason I mentioned Elementor but I am happy to do all in GP if possible and you can guide me further

    Thread Starter chihi108

    (@chihi108)

    Brilliant, it works perfectly now and the page is showing full width with the changes you mentioned
    Thanks a lot

Viewing 15 replies - 61 through 75 (of 79 total)