Support » Plugin: SEO Internal Link Shortcode » Is there a way to include anchors in a link?

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.'"';
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is there a way to include anchors in a link?’ is closed to new replies.