Forums

Anchors in posts generating errors (4 posts)

  1. sirabi
    Member
    Posted 2 years ago #

    When I try to add an anchor in a post or page, whether within the same post/page or to a specific part of a separate post/page, the link always generates the following error when clicked:

    Fatal error: Call to undefined function get_header() in /full/path/to/site/files/wp-content/themes/one-day-at-a-time/index.php on line 1

    When using a relative URL, it seems to tack the #anchorname to the URL for the index, as opposed to the index for the post/page containing the anchor.

    Any thoughts on what might be causing this and how to resolve it?

    Site: http://www.cats3dayadventure.com

    Thanks in advance for the help.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    How are you creating these anchor links? What markup are you using?

  3. sirabi
    Member
    Posted 2 years ago #

    <a name="anchorname"></a>
    
    and 
    
    <a href="#anchorname">Link here</a>
  4. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Try using <a href="http://blog_domain/page_url/#anchorname">Link here</a>

Topic Closed

This topic has been closed to new replies.

About this Topic