Support » Plugin: SEO Internal Link Shortcode » Is there a way to include anchors in a link?
3 years ago
I want to link to a specific section on another internal page, using an anchor. Is there a way to do this with this plugin?
2 years, 11 months ago
I second this. I need to jump to a specific fragment on the page, but it doesn’t appear to be supported yet. Perhaps just adding a new attribute such as this would work:
[link id="1234" fragment="jumphere"/]
Edit: forgot to add the expected output:
<a href="http://domain.com/post-slug/#jumphere">Post Title</a>
This should do the trick. I just tested it on a local site.
if ( !empty($href) )
if ( !empty($atts['fragment']) )
$href .= '#' . $atts['fragment'];
$output = '<a href="'.$href.'"';