Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Links in the footer

  • #9355
    Avatar photo[anonymous]

    Hello:

    I need to put a link in the footer that links to a post. I have inserted the following code in “Theme” – “Custom Settings” – “Footer” – “Copyright Text”:

    <b>© 2023. My website</b>  |  
    

    Privacy Policy

    When I click on the link, it works fine whether I am on the home page or any page in the main menu. But if I am on any page in the tags (for example: /tags/mytag/index.html), it does not find the target page “privacy-policy.html”. How can I get the link to work?

    Thanks in advance.

    Regards

    #9356
    Avatar photo[anonymous]

    Either add a slash to make it relative to your site’s root

    /privacy-policy.html

    or use a full URL like

    https://yoursite.com/privacy-policy.html
    #9358
    Avatar photo[anonymous]

    Hello:

    Thank you for replying.

    [anonymous] wrote:
    /privacy-policy.html

    It does not work. Open the following page: file:///C:/privacy-policy.html

    [anonymous] wrote:

    https://yoursite.com/privacy-policy.html

    Yes, I had thought of that. But the problem is that when I make changes to this page (privacy-policy.html) and I want to preview the changes before uploading them, I can’t, because it opens the page hosted on the server and not the local one, which is the new one.

    I have also tried:

    Privacy Policy

    but it doesn’t work. It does not find the page.

    #9425
    Avatar photo[anonymous]

    If I’m not mistaken, the “Internal Link” variable should be placed in the footer.hbs partial file (in your input folder), not in your Theme settings. I’m also unsure whether that “Internal Link” code works outside of the WYSIWYG Post Editor… You may have to use:

    Get Post helper: https://getpublii.com/dev/getpost-helper/

    Along with the URL tag: https://getpublii.com/dev/post-tags/

    Your best bet would be to either:

    1. Move your copyright code to the footer partial (make sure to create a theme override)
    2. Use the full URL in your Theme Settings