• Hi,

    the content on some of my pages will be split into sections such as;

    Abstract
    Introduction
    Method
    …and so on.

    I would like the sidebar to contain links to these sections, anchored links to be precise. I can visualise how it’s going to work, but I’ve never really delved into php, only edited it here and there.

    So does anyone know how I can achieve this? This needs to be something generic of course so that it would work on any page.

    Actually while typing I’ve realised something, not all the content may have those precise headings, some may not have an introduction for example, so is there any way for the sidebar to pull these section headings from the page dynamically when it loads and generate a list of links based on the headings present?

    I’m using 2.7

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter med123

    (@med123)

    *bump

    Ryan S

    (@ryan_accuwebhosting)

    well, you can create the categories and add the posts to the relative category. Then you can add the category widget to your sidebar.. This will show the links to the various sections of your blog in your sidebar..

    this has nothing to do with php or wordpress…this is plain old html

    <a href="#anchor">go to anchor</a>
    .
    ,
    ,
    <a name="anchor"> you are here </a>

    I would suggest breaking up your document page into shorter pages and then linking to them as opposed to a long page using named anchors.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Anchored Links in Sidebar’ is closed to new replies.