how can I create page jumps?

  • Unknown's avatar

    create page jumps – I’d like to do that, going from my table of contents and jumping to song lyrics on another page.

    I have read the forums info and comments, etc. and tried the recommendations but still cannot do it. Here are the problems:

    I already have a table of contents/”index”. When I write the code for the page jump, is that in addition to the existing table of contents, or do I delete the existing one? If it is in addition, where do I write in the code? Next to other existing item, or above it. etc? (I have tried several ways.)

    Next, the instructions on your Support page say “make sure you have no spaces in your IDs.” But if the subject matter/title. item I want to jump to is, say, “ham and cheese sandwich” (for recipes), will that appear in the index without spaces? That would look funny.

    Anyway, I have been trying several different ways, without success.

    I will be grateful for any suggestions/ assistance you could provide.

  • Hi there,

    When I write the code for the page jump, is that in addition to the existing table of contents, or do I delete the existing one?

    The code for the anchor links (“page jump”) should be incorporated into your existing table of contents.

    Next, the instructions on your Support page say “make sure you have no spaces in your IDs.” But if the subject matter/title. item I want to jump to is, say, “ham and cheese sandwich” (for recipes), will that appear in the index without spaces? That would look funny.

    Since the IDs are not visible to human reader, no one will see them. :-)

    If you’d like to provide a link to your table of contents, I’d be glad to code one for you as an example, so you can have a look directly.

  • Unknown's avatar

    Hi, Kathryn

    Thank you so much for your help, and yes, I would be very grateful if you could provide an example (since, although I tried again, I could not put the code in the correct location – in any case, it did not work for me).

    The link is:

    http://mazzolindicanti.wordpress.com/wp-admin/post.php?post=24&action=edit

    At least, I hope that is it. I can give you the password, etc. if you need it.

    By the way, for some reason I cannot read your emails sent to (email visible only to moderators and staff), although other support staff have sent me emails there with no problem.

    So, just for this time, could you please email me at:
    (email visible only to moderators and staff).

    Thanks, Ken/Anselmo

  • Sure, no problem. I created two example link/anchor tag pairs on your site so you can have a look.

    Song # 1 –

    link:

    <a href="http://mazzolindicanti.com/lyrics-2#aba">Addio, Bel, Addio</a>

    anchor:

    <h3 id="aba">Addio, Bel, Addio</h3>

    Song # 2 –

    link:

    <a href="http://mazzolindicanti.com/lyrics-2#amtl">Addio, Morettin, Ti Lascio</a>

    anchor:

    <h3 id="amtl">Addio Morettin Ti Lascio</h3>

    So, just for this time, could you please email me at:

    Our support tool doesn’t allow us to send emails to an address that’s not already connected to your account, but I will send you an email separately to make sure that you see this in the forum.

  • Unknown's avatar

    Kathryn,

    Thanks very much. I am eager to try writing the code for a song that, for example, begins with a “D”, to see if I can get it to jump. However, before I start that, there seems to possibly be a problem with what you did, and I would like to make sure about that. Namely, you wrote the page-jump code for two songs. But when I click on them in “Contents”, both of them seem to jump to the same song. In other words, the first one should jump to Song 1 and the second one should jump to Song 2, but they both see to jump to Song 1. Am I doing something wrong?

    Ken

  • Hmm – I’m not seeing that at my end in Firefox:

    When I click:

    Lyrics

    …I get to the song “Addio, Bel, Addio.”

    and when I click:

    Lyrics

    …I arrive at the song “Addio Morettin Ti Lascio.”

    I just looked at the same page in Safari, and I see what you mean! Safari doesn’t seem to understand how to interpret those anchor links. Let me do some further testing and get back to you.

  • I made a small tweak to the code and Safari is happier now. :-)

    The code now looks like:

    <a href="http://mazzolindicanti.com/lyrics-2/#aba">Addio, Bel, Addio</a>

    <a href="http://mazzolindicanti.com/lyrics-2/#amtl">Addio, Morettin, Ti Lascio</a>

    Safari apparently won’t respond to the links without a slash just before the anchor portion (#xxx). With the slash they work as expected.

  • Unknown's avatar

    Fabulous. Thank you so much for your time and help. What you have done works. Now it is up to me to try. Hopefully (???), I will not be back in touch again on this topic, so, once again, thanks.

  • My pleasure. Good luck!

  • Unknown's avatar

    Kathryn,
    One last thing. I am being picky, but the jump goes one or two lines too low. In other words, (in this case) it jumps right to the lyrics of the song (which is, of course, basically what I want), but it cuts off the title of the song. Of course, the viewer could scroll up a line or two and get to the “real” place where I want to start the anchor, which includes the title, but the viewer will not know to do that.

    In the forum, a few months ago, someone else seemed to have that problem and advised “setting the anchor (#) in the line above what you want to show”.
    My problem is that there is no (#) or # in the anchor code, as far as I can see.

    I tried moving the anchor code line up a few lines, etc. but the result is always the same – – the title is cut off when you jump from the Contents to the anchor.

    Can you recommend something to fix this?

  • Hi there – This seems to be a browser-specific behaviour, and depends whether you’re logged in or not.

    For example, I don’t see the title cut off in several browsers, including:

    http://cl.ly/image/2i2E2w0l1T0k – Safari not logged in

    http://cl.ly/image/251m3z1H2h3Z – Firefox logged in

    http://cl.ly/image/281z1V23211c – Chrome not logged in

    I do see it cut off in Safari and Chrome when logged in:
    http://cl.ly/image/3b0A3a0I222q

    However, since you repeat the song title twice, readers still see the title.

    If you wanted to, you could place the anchor tag instead on the line of ++++ symbols that you have between each song. For example:

    <p id="aba">++++++++++++++++++++++++++++++++++++++++++</p>

  • Unknown's avatar

    Kathryn,
    Sorry – – I’m back. I have been writing the codes you gave me for page jumps, but a strange problem has come up – – the lines of code change after I am finished.

    I have been writing the codes for pages jumps (and anchors) for about 10 jumps each time. (In total, my site/blog has about 200 places where I would like jumps.) For each one, I test it when I am finished, and it seems OK. Then, when I am done for that session, I test them all, and they are OK. But then, the next day, some of them are OK, and some do not “jump”. When I look at the “edit” pages, for the ones that do not jump there is something strange going on by the anchor codes. Namely, some of the coding has disappeared (i.e., at the beginning of the anchor part, only <h3> remains), and some of the coding has jumped to different lines. I am sure that I am not making a mistake when I enter the coding because (1) I test it each time and (2) the exact same changes are happening each time. (If I were making typos that would not happen.)

    Also, every day this is happening for different jumps. About half of the jumps remain OK (but different ones than on prior days) and half (new ones each time) are no good.

    Each time I of course click on “Update” when I finish coding for a particular jump, and when I am all done for that session I log out of the blog. Is there an additional place where I should be clicking “save” or something like that, to make sure that the coding does not change or jump around? Do you have any idea what is going wrong? Any suggestions?

    Thanks. Ken

  • Hi there – I’m not sure why your anchor links aren’t “sticking,” but I wonder if I may make a suggestion at this point.

    Have you considered making each song a post instead of including many of them on a single page? This way you could assign a category to each post (i.e. Lyrics, Recipes) and each song/post would have its own nice, clean URL – something like this, for example:

    https://mazzolindicanti.wordpress.com/category/lyrics/addio-bel-addio/

    You’d automatically have archives for each category which would link to each post – this would act as a table of contents. This method would avoid having to manually create all these anchor links and anchor points.

    Since you’re not using your posts for anything else, this would be an ideal way to display your songs and avoid a huge amoung of manual work.

    Let me know if this is something you’d consider and whether you have any questions.

    If you don’t want to pursue this option, could you please show me an example of a song that’s missing the anchor code?

  • Unknown's avatar

    Kathryn,
    Thanks again for your help. I am sorry for the delay in replying but I was out of town on an urgent matter and could not devote time to personal matters (although this WordPress site is very important to me).

    Since I was having some problems communicating with you, I also received a nice reply from Jeremy. I will acknowledge that separately.)

    Now, back to the page jump problem. Thanks for your suggestion about categories, etc. but it is difficult for me to understand that concept. Do you know of any blogs/sites i could look at for good examples?

    For the time being, I would be interested in a solution, if possible, to the page jump coding problem.

    Could I prevail on you to please look at my site one more time? (You must be so bored with it by now . . . ) The site is http://www.mazzolindicanti.com
    So far I have only done the coding up to the beginning of the “F” songs. If you look on the site itself and try the page jumps under “Contents – Lyrics”, you will see that some work and some do not. For some examples, Allo Spontar degli Alberi works fine, and so does the last one I did – Fameja dei Gobon, La.

    But if you try to jump with “Donna Lombarda” and “Dormi, Mia bella, Dormi”, you will see that the jump does not work for them.

    If you then go the “edit” for the Lyrics page (i.e., the anchor page) on the dashboard (www.mazzolindicanti.wordpress.com/wp-admin/) you can see why. Namely, with Allos Spontar degli Alberi, the anchor code stayed the same as when I typed it in. <h3 id=”asda”> appears before the +++++++ line and </h3> is after the title of the song, and it works perfectly.
    But then see, for example, Donna Lombarda. I typed in the proper anchor code, and the page jump worked fine that day, when tested.
    But the next day, somehow that code had been changed – – <h3 id=”dl”> changed somehow to <h3> only, and the final </h3> had jumped up one line, to the end of the ++++++++ line instead of where it was originally placed, after the title line.

    This is a mystery to me, and it prevents the page jump.

    Please note that this problem has occurred with different songs on different days, so when you look at this, the good and bad page jumps may be different than the examples I gave above. But if you scroll down the “Lyrics” edit page, you will see where the anchor code is bad on some songs.

    In searching through the forums (and on Google) I saw that other folks seem to have had the same or similar problems. Is there any solution?

    Thanks. Ken

  • Is it possible that you’ve made page edits in Visual mode after adding anchor tags to the page? The only thing I can think of is that using the visual editor has somehow moved the tags around inadvertently.

    This is what I see currently, for example:

    <h3>++++++++++++++++++++++++++++++++</h3>
    <strong>Donna Lombarda</strong>

    Unfortunately if you flip back and forth a lot between Visual and Text modes things like this can crop up. With such a long page and so much editing, you’re prone to this sort of thing, I’m afraid.

    If you always keep the editor in Text view it might help a bit, because you have more control over the code.

  • Unknown's avatar

    Thanks. I’ll try to keep it in text mode.

  • The topic ‘how can I create page jumps?’ is closed to new replies.