I’m trying to wrap a div using a shortcode that I’m calling from within my themes template.
So far I have this:
<?php echo do_shortcode('[tooltip content="Delete" url=""]'.<div class="delete-button-comments"><?php if ( bp_activity_user_can_delete() ) bp_activity_delete_link(); ?></div>.'[/tooltip]'); ?>
but I’m getting a syntax error (which I know why) but if I delimit the periods and apostrophes nothing happens at all.
So basically I would like to wrap the tooltips shortcode around the div that displays the icon that the div displays.
bp_activity_delete_link
echoes the link, you should usebp_get_activity_delete_link()
to return the value. Not exactly sure what you’re trying to do, maybe something like: