Use the AddToAny template tag in PHP like:
$ret = '<p>TEST</p>';
if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) {
$ret .= ADDTOANY_SHARE_SAVE_KIT( array(
'buttons' => array( 'facebook', 'twitter' ),
'output_later' => true,
) );
}
$ret .= '<div class="square-boxes"><div class="square-boxes-wrapper">';
Thread Starter
jonhs
(@jonhs)
Thank you. Can you advice how to insert shortcode in the below code. See placement where it says “SHORTCODE HERE” here:
function square_boxes_shortcode( $atts, $content = null ) {
$ret = "<p>Text</p>
<p>Text</p>
<p><strong>Text</strong><br />
<div class='btn-varaa'><a href='http://xxx'>Text</a></div>
<br />
text</p>
<p><a href='http://xxx'>Text/a></p>
INSERT SHORTCODE HERE
<div class='square-boxes'><div class='square-boxes-wrapper'>";
$k=0;
while(the_repeater_field('square_boxes', 'options')) {
$k++;
$text = get_sub_field('text');
$lines = 1;
$lines += substr_count($text, "<br/>");
$lines += substr_count($text, "<br />");
$lines += substr_count($text, "<br >");
$lines += substr_count($text, "<br>");
$ret .= "<div class='square-box box-nth-".($k%3)."'><a href='".get_sub_field('link')."'><span class='text lines-count-".$lines."'>".$text."</span></a></div>";
}
$ret .= "<div class='clearer'></div></div></div>";
return $ret;
}
-
This reply was modified 8 years, 3 months ago by
jonhs.
-
This reply was modified 8 years, 3 months ago by
jonhs.