I am a bit stuck and would please like some help if possible:
I have this circle button link with two bits of text in that I wish to make a shortcode:
<a href="">
<div class="find-out-btn alignright">
<h3>Header Text</h3>
<p>Paragraph text</p>
</div>
</a>
But at the moment I cannot call the function to create it as an actual shortcode - any ideas where I am going wrong?
This is my php so far:
// Add Shortcode
function visit_info_shortcode( $atts , $content = null ) {
// Attributes
$atts = shortcode_atts(
array(
'link' => ‘',
’title’ => ‘',
’subtitle’ => ‘',
),
$atts
);
$link = $atts['link'];
$target = $atts['target’];
$title = $atts['title’];
$subtitle = $atts['subtitle’];
if ($link) {
return '<a class="visitinfo" href="'. $link .'"><div class="find-out-btn alignright"><h3>' . $title . '</h3><p>' . $subtitle . '</p></div></a>';
} else {
'<a class="visitinfo" href="'. $link .'"><div class="find-out-btn alignright"><h3>"Visit"</h3><p>"Find out More"</p></div></a>';
}
}
Any ideas how I link it up to WordPress?
Many thanks,