-
AuthorPosts
-
January 31, 2016 at 4:04 pm #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!
January 31, 2016 at 8:01 pm #575380Hey!
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!
JosueJanuary 31, 2016 at 9:29 pm #575426Hi 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.
January 31, 2016 at 10:47 pm #575443Hi!
Once the code has been added you need to place
[current_user]
wherever you want the welcome message to appear.Regards,
JosueFebruary 1, 2016 at 3:37 pm #575820Hi!
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!
February 2, 2016 at 10:46 am #576347Hello!
Sounds a bit complicated, unfortunately that’s beyond our support scope. You can request a customisation quote from a third-party provider here.
Regards,
JosueFebruary 3, 2016 at 9:37 pm #577359Hi!
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!
February 3, 2016 at 10:31 pm #577385Hey!
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,
BasilisFebruary 3, 2016 at 11:25 pm #577414Hi 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!
February 4, 2016 at 3:57 am #577499Hey!
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 -
AuthorPosts
- You must be logged in to reply to this topic.