Static Blocks in Promo Text - by stieranka

This topic has 9 replies, 2 voices, and was last updated 5 years, 1 months ago ago by Rose Tyler

  • Avatar: stieranka
    stieranka
    Participant
    October 16, 2019 at 18:24

    Hi,
    is possible add Static Blocks in Promo Text (in header slider)? Becouse only Admin can edit PromoText! This is problem.

    Steve

    8 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 17, 2019 at 07:06

    Hello,

    Sorry, but your question is a bit unclear for me. Please describe it in more detail with screenshots.
    You can use Lightshot screenshot tool https://app.prntscr.com/en/index.html to share screenshots, it creates a link to the image and you will just send us that link.

    Do you use the default header or header builder?

    Regards

    Avatar: stieranka
    stieranka
    Participant
    October 17, 2019 at 08:33

    Hi,
    I would like to insert shortcode into Promo Text. Currently, shortcode is not supported.
    See – https://prnt.sc/pkfio0

    Promo text can only be changed in theme settings and can only be changed by Admin (problem). I want it to be edited by Editor or Shop Manager – that’s why I want to use a shortcode Static Block.
    You could think of it when developing Header Builder …

    Steve

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 17, 2019 at 08:43

    Hello,

    Create a static block, for example,
    Header info line – http://prntscr.com/pkfpk9
    http://prntscr.com/pkfput >

    [vc_row][vc_column][etheme_scroll_text bg_color="#222222" height_value="30px"][etheme_scroll_text_item tooltip="true" tooltip_title="More details" tooltip_content="You can add anything here from Admin Panel."]<i class="et-icon et-coupon"></i> Take 30% off when you spend $150 or more with code xstore78
    [/etheme_scroll_text_item][etheme_scroll_text_item tooltip_content_pos="top" tooltip="true" tooltip_title="More details" tooltip_content="You can add anything here from Admin panel."]<i class="et-icon et-delivery"></i> Free 2-days standard shipping on orders $255+[/etheme_scroll_text_item][etheme_scroll_text_item button_link="url:https%3A%2F%2Fxstore.8theme.com%2F%3Fpage_id%3D5|title:Read%20more||"]You can add anything here from Theme Options.[/etheme_scroll_text_item][/etheme_scroll_text][/vc_column][/vc_row]

    then add this block into the header using HTML block – http://prntscr.com/pkfs2c

    Regards

    Avatar: stieranka
    stieranka
    Participant
    October 17, 2019 at 11:43

    Hi,
    thanks.
    Hm… good idea. I guess I looked at it badly … I wanted to modify the original element instead of using another.

    In the meantime, I modified file
    /wp-content/plugins/et-core-plugin/inc/customizer-bulder/templates/header/promo_text.php
    line 73 change from

    <span class = "text-nowrap"> <? php echo $ key ['text'] '; ?> </ Span>

    to

    <span class = "text-nowrap"> <? php echo do_shortcode ($ key ['text'] '); ?> </ Span>

    After I create a custom shortcode (insert to function.php in child theme) for show et-icons:

    // shortcode for show et-icon
    // use: [ss_show_et_icon icon="delivery" typ="light"]
    // icon: delivery, coupon, calendar, compare, checked, chat, phone, exclamation, gift, heart, message, internet, sent, shopping-bag
    // typ: bold, light
    add_shortcode( 'ss_show_et_icon', 'ss_show_et_icon_func' );
    function ss_show_et_icon_func( $atts ) {
    	global $et_icons;
    	$param = shortcode_atts( array(
    		'icon' => '',
    		'typ' => '',
    	), $atts );
    	if ( $param['icon'] != '' ) {
    		if ( $param['typ'] == 'bold' ) {
    			$icons = $et_icons['bold'];
    		} else {
    			$icons = $et_icons['light'];
    		}
    		$output = '<span class="et_b-icon" style="top: 2px; margin-right: .3em;">'.$icons['et_icon-'.$param['icon']].'</span> ';
    		return $output;
    	}
    }

    But your solution is better :-), I write only if someone would use shortcode…

    Steve

    Avatar: stieranka
    stieranka
    Participant
    October 17, 2019 at 11:50

    One more note – your solution doesn’t have a “Close Button”

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 17, 2019 at 12:27

    Hello,

    Thanks for the reply.
    Additional customization in files is outside the scope of basic theme support, sorry.
    You are right about the “Close Button”, it is available via settings from the Header builder > Promo text element, only.
    There is no ready solution/workaround for this feature right now.
    You can post such feature requests and suggestions here – https://www.8theme.com/forums/xstore-wordpress-support-forum/xstore-features/

    Regards

    Avatar: stieranka
    stieranka
    Participant
    October 17, 2019 at 12:46

    Hi,
    OK, I add this to XStore feature requests.

    Steve

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    October 17, 2019 at 12:49

    Hello,

    Thanks, one of our developers will check it.

    Regards

  • Viewing 9 results - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.