• Resolved appelby1010

    (@thegreatdanton)


    Hi,

    I recently used a photograph from the internet on a WordPress template. I sought permission from the owner first and he asked me to reference his website in the code. I’m not sure how to do this.

    What I want is for somebody to view the owner’s website if they right click on the homepage of my site and ‘view page source’. Does anyone know how I can comment code on a WordPress template?

    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You can add a comment to HTML markup using:

    <!-- insert comment here -->

    Note: The spacing is important.

    Thread Starter appelby1010

    (@thegreatdanton)

    Thanks esmi. When you say the HTML markup do you mean putting this code into the HTML tab on the home page? As in, when you log into the administration section, click on Pages, click on the Home Page, then click on the HTML tab on the top right of the text editor? Is this where I enter the comment?

    Thanks

    When you say the HTML markup do you mean putting this code into the HTML tab on the home page?

    Yes. And don’t switch over to the Visual Editor on this post. EVER! Or you risk your comment being removed by the Editor.

    Another approach would be to add image owner’s url to the image’s title or the alt text. Something along the lines of “Used by kind permission of http://domain,.com”. That would be visible in the page source and if someone placed their mouse over the image in IE. And it doesn’t tie you to using just the HTML tab.

    Thread Starter appelby1010

    (@thegreatdanton)

    Yes. And don’t switch over to the Visual Editor on this post. EVER! Or you risk your comment being removed by the Editor.

    I’m not sure what you mean by this comment?

    Unfortunately I can’t add anything to the images’s ALT tag or title as the image is not being added through the text editor. The theme is here and the image is similar to the three images below the fold on the home page. I’ll give the commenting a go and see what happens. Thanks

    If you add markup to a post using the HTML tab and then switch over to the Visual tab (either immediately or any time after), you will lose some (if not all) of your markup – including your comment. Once you use the HTML tab to create/edit a post, you need to avoid using the Visual tab when re-editing the post.

    Thread Starter appelby1010

    (@thegreatdanton)

    Ok, i understand now. That’s very interesting. Is that just for posts or does it include pages as well?

    Pages as well, I’m afraid.

    Thread Starter appelby1010

    (@thegreatdanton)

    No problem, thanks for your help

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How do I comment code on a WordPress template?’ is closed to new replies.