Support » Theme: Go » Footer edit

  • Resolved tijanatina

    (@tijanatina)


    Hello, here is site info that cannot be removed and I cannot see where I edited it. I must had been editing it, since it says only © 2020, but cannot find where and how.

    Also, in copyright place which is right next to it, hyperlink won’t work, can someone tell me which code to use, or why…
    Thanks!
    Cheers!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Evan Herman

    (@eherman24)

    Hi @tijanatina

    It doesn’t look like it’s currently possible to remove the copyright symbol and the year. There is no filter or any method to add or remove that bit of text.
    https://github.com/godaddy-wordpress/go/blob/2124978e733a8351f63cdeb00c4c95663dd91dcd/includes/template-tags.php#L478

    We can certainly look into making it possible to remove that text in a future release.

    As for the hyperlink, that should be working. In the customizer, if you head into the ‘Site Settings’ section you can edit the copyright text. If you add an a element, it should render correctly in the footer.

    Example:
    This is a <a href="http://www.example.org">test</a>

    Let us know if that helps.

    tijanatina

    (@tijanatina)

    Thank you Evan, it’s ok about the site info, it’s copyrighted anyways, it 2020 anyways, so it’s okay, I just thought I was missing something.
    But copyright link: strange things happen here:
    About the href code: it does not work. I tried the same code before, because it’s standard but it does not work. Check it out on the website – there is no link. Strange thing happens every time I do so: I enter the code with the text. Before publishing it, in “preview mode” in front-end in copyright part, underline below the text “test” shows up – like there is a link, but when hovering over it with mouse, red “restricted” icon shows up over the linked text. Then I publish it, and there is no underline anymore, and not any link. Only the original text without the code. Moreover, I return to site settings part, go to edit again the copyright text, but, strangely, a href code disappeared, only text that should be seen is there “This is a test”. So it deletes the code. I tried various links, texts, and every time the same happens.
    The theme is great though overall, it is amazing.
    Thanks!

    Evan Herman

    (@eherman24)

    The red restricted icon shows up in the customizer because you can’t click external links when customizing your site or it would navigate away your site without your changes saving.

    I think what the issue is, is that on save the anchor tag is stripped from the customizer copyright text value. So on output, it’s just not rendering.

    I think the alternative option would be to write a custom function to filter the footer text, and append the text you want onto the value set in the customizer. In my testing, this appears to allow links to be added.

    You’ll want to add the code to a custom MU plugin. We have a tutorial setup on one of our other themes that explains how to create an MU plugin.

    https://godaddy.github.io/wp-primer-theme/tutorials-and-examples/tutorials/mu-plugin.html

    Once you have the MU plugin created, you can drop the code below into it, save the file and the footer should display with the link.

    /**
     * Custom footer copyright text
     *
     * @param  string $copyright_text Original theme mod copyright text from the customizer.
     *
     * @return string Filtered footer copyright text.
     */
    function custom_copyright_text( $copyright_text ) {
    
    	if ( is_admin() ) {
    
    		return $copyright_text;
    
    	}
    
    	return $copyright_text . ' This is a <a href="#">test</a>.';
    
    }
    add_filter( 'theme_mod_copyright', 'custom_copyright_text', PHP_INT_MAX );
    tijanatina

    (@tijanatina)

    Thank you Evan, I will try to do it tomorrow and will let you know how it went!

    Evan Herman

    (@eherman24)

    @tijanatina Great!

    I’ve got a PR up to update a few things in the theme, which would allow for the link markup to be saved directly in the customizer. I’ve also added some filters to allow for things to be filtered or removed from the theme. If you’d like to follow along with that, things can be found here: https://github.com/godaddy-wordpress/go/pull/468

    We’ll be reviewing things and if/when that gets merged the new functionality will be available in the following release.

    Evan

    @tijanatina We’ve got the PR merged and these enhancements are included in the 1.2.5 release of Go. It should be fairly simple to achieve what you are looking for.

    Thanks again for the suggestion!

    Best,
    Evan

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.