Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1276520

    Inside the animated numbers I would like to use the value [reportcount] of the plugin ‘Einsatzverwaltung‘.

    I tried it as follows, unfortunately it does not work:

    [av_animated_numbers number='[reportcount]' start_from='' icon_select='no' icon='ue800' font='entypo-fontello' number_format='' circle='' circle_custom='' circle_border_color='' circle_bg_color='' circle_border_width='' circle_size='' font_size='' font_size_description='' color='' custom_color='#444444' timer='' link='' linktarget='' id='' custom_class='' av_uid='av-kkjs5795' admin_preview_bg='']
    Add your own text
    [/av_animated_numbers]
    
    • This topic was modified 3 years, 9 months ago by MSchrauf.
    #1277555

    Hey MSchrauf,

    Thank you for the inquiry.

    You may need to look for a different animated number solution in this case because the default animated numbers element from the builder does not accept shortcode as parameter value by default.

    Or we could create a custom shortcode based on the markup of the current animated number element. Please add this code in the functions.php file to create the custom animated number shortcode.

    // custom animated numbers
    function avs_animated_number_mod_cb( $atts ) {
    	$number = do_shortcode("[reportcount]");
    	return "
    	<div class='avia-animated-number av-force-default-color avia_animate_when_visible number_prepared' data-timer='3000'>
    		<strong class='heading avia-animated-number-title'><span class='avia-single-number __av-single-number' data-number_format='' data-number='{$number}' data-start_from='0'>
    			</span>
    		</strong>
    		<div class='avia-animated-number-content'>
    			<p>Add your own text</p>
    		</div>
    	</div>";
    }
    add_shortcode( 'avs_animated_number_mod', 'avs_animated_number_mod_cb' );
    

    In a code or text block, use this shortcode.

    [avs_animated_number_mod]
    

    This should automatically assign the value of the [reportcount] shortcode in the number parameter.

    Best regards,
    Ismael

    #1278327

    Perfect, that works very well. Thank you very much!

    #1278499

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Animated numbers with value from shortcode’ is closed to new replies.