Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #575314

    Hello,
    it is possible the logged in username display on (redirected) page body text? The user log in, and see this text on the page: Welcome Peter!. This inscription would be the page H1. I hope you understand me.

    Thank you for your help! Have a nice weekend!

    #575380

    Hey!

    Try adding this at the very end of your theme / child theme functions.php file:

    function custom_shortcode_func() {
    	ob_start();
    	$current_user = wp_get_current_user();
    	echo 'Welcome ' . $current_user->display_name . '<br />';
    	$output = ob_get_clean();
        return $output;
    }
    add_shortcode('current_user', 'custom_shortcode_func');

    Then use [current_user] to show the current user name.

    Cheers!
    Josue

    #575426

    Hi Josue,

    thanks for the quick answer. The code doesn’t work :( I added the code functions.php file ->save->log in my website and nothing happened.

    #575443

    Hi!

    Once the code has been added you need to place [current_user] wherever you want the welcome message to appear.

    Regards,
    Josue

    #575820

    Hi!

    It’s work!!! :) Super, thank you for your help!

    I have one more question for you: I have a page with video. I would like to schedule the content elements at the video below. It’s possible? The visitor only see the video on my page and he play this, after that the content displayed on the video below.

    Have a nice day!

    #576347

    Hello!

    Sounds a bit complicated, unfortunately that’s beyond our support scope. You can request a customisation quote from a third-party provider here.

    Regards,
    Josue

    #577359

    Hi!
    I found a plugin: https://wordpress.org/plugins/timed-content/

    My question is: How can i put the shortcode page HTML? Now, i can put only the text block. I would like schedule the all content at the video below.

    Thank you!

    #577385

    Hey!

    You can try use the text block, or use to load a ” sidebar ” with a widget that includes that code.
    One of those 2 ways will be able to work right.

    Best regards,
    Basilis

    #577414

    Hi Basilis!

    Sorry (my mistake) we don’t understand each other. I speak a little bit in english.

    My problem is with the 2 ways: I have more elements in this page (buttons, images, separator…) and I schedule ALL. If I put the shortcode one text block, the plugin schedule only that. My question is: Is there any way I put the shortcode the page html top ([timed-content-client show=”1:0:0″ display=”div”]) and the end ([/timed-content-client]), thereby I schedule all content elements under the video?

    Thank you so much!

    #577499

    Hey!

    No, that won’t work because ALB elements can’t be wrapped with raw shortcodes, what you’d need to do here is use the raw shortcodes of these Enfold elements and wrap them with the timed-content one (in a single or multiple Text Block) so it ends up like:

    [timed-content-client show=”1:0:0″ display=”div”]
    [av_button label='Click me' link='manually,http://' link_target='' size='small' position='center' icon_select='yes' icon='ue800' font='entypo-fontello' color='theme-color' custom_bg='#444444' custom_font='#ffffff' custom_class='']
    [/timed-content-client]
    

    Note however that not all Enfold elements can be wrapped like this (for example Color Sections or Full Width Separators). Also i’d suggest you to enable ALB debug mode so you can see the raw generated shortcodes below the ALB editor.

    Cheers!
    Josue

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.