Jump to content

- - - - -

Boxes Title Links to specific sections on a different page

Boxes links anchor

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1 carldesigns



  • Members
  • 3 posts

Posted 25 May 2013 - 11:00 PM

I have three Boxes on my home page — each one is a specific service. I'd like to have each of the Box Titles take me to the same page but different sections in the content marked with <h3> headings.


How would I write the code and where?

#2 Rob


    One Smart Egg

  • Members
  • 13575 posts

Posted 26 May 2013 - 01:31 PM



If there is an <a name="part1"> tag or any tag with an id (e.g., <div id="part1">), then you can simply append #foo to the URL. Otherwise, you can't arbitrarily link to portions of a page.  Just be very careful that the id is unique, and one you custom created or the link will not work properly.

Here's a complete example: <a href="

Please Login or Register to see this Hidden Content

">Jump to #part1 on page.php</a>  This isn't a section specific thing, but a matter of including the correct identifying tag in the section, at the beginning of any content within it.  It doesn't work on H3 alone (and you don't want it to) but, if could work with <h3 id="part1">.


I should advise that having too many H# tags in a page can have a minor adverse affect on SEO.  Thus my recommendation would be to use <div id="part1"> instead. Just make sure to remember to close the tag with </div> at the end of your content.