Did you add page jumps & back to top links into your post only to have them fail after a while? Or, even worse they never worked at all, but you still want them! Don’t worry, I have the solution!
Are you mad because you thought you finally had the solution to your problem, only to have your readers complain the links are now broken?
Does it leave you feeling frustrated and confused? Well, worry no more! I have you covered yet again.
Table of Contents:
- Surprise! It doesn’t work anymore!
- So, what is the problem?
- What am I going to do about it?
- What to do before you fix the problem!
- How to fix the trouble:
- Step 1: Removing the added content:
- Step 2: Adding spaces where needed:
- Step 3: Removing the separated code
- My Conclusion:
- My closing remarks:
Surprise! It doesn’t work anymore!
I’m surprised that none of my readers have complained about this problem yet. In my article,” How to Create Easy Page Jumps & Back to Top Links in WordPress” I gave you two codes to create these links within your article. Those codes worked for two years, but now it’s a different story. I found out about the trouble only when I went to publish a new article, and none of my page jumps or back-to-top links were working. “Just great,” I thought, what now?
I played with the code for a few days and figured out what was happening. It seems for some unknown reason WordPress was rearranging the position and adding unnecessary code all by itself. Just wonderful! Now what was I going to do?
After many days of trial and error, I figured out how to retype the text code, rearrange the spacing, and remove unnecessary extras. So now, it’s working again, but for how long, I don’t know.
So, what is the problem?
After lots of research and asking around, I found out that some WordPress plugins can have this effect on a few select coding areas. No one could tell me exactly which plugins were responsible though. It seems it all depends on which plugin combinations you have, and which WordPress version update you’re using. Great! Now we have a mystery on our hands.
So, was my fix going to work for a while, or was it going to fix the problem for good? No one could answer that question either. When I asked, “What am I supposed to tell my readers? “ They only shook their heads and shrugged their shoulders. They had no idea.
What am I going to do about it?
Well, now I’m faced with this pickle, what do I do about this issue that I face alone? After much thought, I came up with this solution. I will write this article and again give out the code changes to fix the new problem.
Will it work? Yes, for a while. I’m hoping this fix will last for at least four years, just as the last fix did. If you’re one of the lucky ones who haven’t faced this issue yet, congratulations. If, however, you’re not that lucky here’s the solution for now.
What to do before you fix the problem!
I’m going to suggest that before you do anything else with your article you copy the whole thing, pictures, and all into another document. I copy and paste mine into a Word document to save it just in case something goes wrong.
With this backup in place, I can go ahead and fix my problem without having to worry about losing my whole article. This also gives me confidence to play with the coding, because even if I do mess it up, I haven’t screwed up my whole website, just one article. When this happens, all I need to do is replace it with my backup copy and I haven’t lost a thing. That takes a huge load off my mind when doing things like this.
How to fix the trouble
First, go ahead and use my original codes from my other article. Here’s the link to that article in case you need to go back and get them.
Now, back to the teaching, this is a three-step process:
Step 1: Removing the added content:
Go ahead and paste the code I gave you before into your text area, just like before, but this time DO NOT REMOVE THE ASTERISKS YET. After you have them pasted into your code YOU MUST PUBLISH THE ARTICLE to see if they work or not. Seeing as you’re reading this article, I’m assuming they don’t.
Next, you’ll need to open your dashboard in another tab on your computer screen. You should have two tabs open with your dashboard on them for the same article.
Now, you need to go to the first asterisk marker within your code area and compare it to the code you copied into the other tab. Look closely, some of the added content from WordPress is small, such as extra quotation marks. It took me a long while to find these myself, they are easy to overlook. Here is what they look like.
I’m using the back-to-top error as my example, but this same technique applies to all the added-to-code errors.
Please look closely, you’ll notice that one set of quotation marks is smaller than the other set.
ONLY THE SMALL ONES ARE NEEDED.
Place your cursor behind the larger one and delete it, do the same for the other large one. Next, it’s time to click on update. You’ll need to look and see if your correction was applied or not. If it worked, good, if not try again. It should look like this when your corrections are made and accepted.
Step 2: Adding spaces where needed:
The next step is to add spaces between the code and other areas. WordPress was giving me something that looked like this.
Notice there isn’t a blank space between the and the “top” code.
It should look like this.
Above there are two lines with nothing in them before and after the “top” code. One on each side of it. This is how it should appear, another example is below.
Please, disregard the red squiggly lines in the image above, They were spelling indicators from Grammarly that showed up during my screenshot.
If it doesn’t look like this (minus the two red lines), please place your cursor behind the line above where the space should be and click on the enter button. This will put in a blank space for you on the line below, then click the update button again to save it.
Step 3: Removing the separated code.
Sometimes, the code you copy into the area gets separated during the process. Here’s what’s going on.
This first example is what it should look like.
If you look closely at the code, you’ll see I’m using my conclusion as a title in this example.
Here’s an example of the same code with the separation.
If you compare the two examples above, you’ll see it has been separated. It has divided the last part of the title code into two sections. It placed the first part at the beginning of the line above, and the second part at the end of that same line.
So, how do we fix this?
I opened my article up in a new tab on my computer, so I now have two of the same sites open simultaneously. Why do I do this? It’s to see what the code looks like BEFORE I add anything to it.
I then return to the first tab add my code to the text portion of that post and click on update. Open the text portion again in the same tab to see what it did, and how it looks. If it’s correct, you’re done.
If it isn’t, it’s time to again compare both tabs to see how it’s been separated. Once you’ve figured out what happened, you’ll need to CAREFULLY highlight only it, click copy on only that part of the code, and paste it onto the line below where it belongs. Don’t forget to do the same with the separated back part too. Click on update to save your changes.
Now, you can see why it’s so important to have two tabs open at the same time to compare with. Go check again on your website to see if all of your links and jumps are working. If so, now you must go back into the coding and carefully remove the asterisks.
Click on the update button once more to save all the changes.
that should be it. You’re done.
That was a bit harder than the other parts, but now you know what to look for and how to fix it if it happens again later on.
I want to thank you for sticking with me through this whole article. It really shouldn’t have been necessary to write it in the first place, but who could have predicted that combining plugins with updated WordPress sites could mess with your coding for Page Jumps? Not me, that’s for sure.
In this article, we learned.
- That there was a problem with our Page Jumps,
- What caused the trouble?
- What was I going to do about it?
- What you should do before fixing the trouble.
- And the easy three-step process to fix the problems.
Now that you know what to do if this ever happens to you, you’ll be prepared to take action and get it solved right away.
Yes, I understand just how scary this whole process can be. But, if you take precautions beforehand and copy your work to another document, at least you have a failsafe way to get your work back. So, this process shouldn’t be as scary as it was before.
My closing remarks:
I hope you enjoyed this article and feel it has met all your needs. If for some reason I haven’t met your needs, please let me know how to better serve you in the comments area below, or by contacting me privately. I want to make it right.
If you have any questions about this article or anything else please feel free to leave a comment below. I would love to hear from you and help in any way I can. I’ll get back to you as soon as possible. (Usually within 24 hours or less.)
Do you feel this article has been helpful, and appreciate the information I’ve provided? If so, could you please share this article with your friends and family on your social media sites? This would greatly help my website grow, so more readers can access this information. I appreciate your support for this website and hope you’re willing to share this information with others. (giving me credit of course.)
Don’t forget to: “Like”, “Share”, “Pin”, and “Tweet” to show your support.
Thanks for stopping by,