Random Code and Legacy Widgets
-
When I logged in to my site yesterday to add some content, I was horrified to see the mess that appeared. The items that had been in my sidebar were now in their own blocks at the bottom, and there is a lot of garbage code referring to gravatars all over the bottom of the page. I tried changing the theme, and I can’t get the old one back. That’s not a huge problem, but the garbage code is a problem. I don’t know how to get rid of it, and how to get the widget content in the right place.
This is the junk I am seeing



The colored blocks on the left side are what used to be in the sidebar. I tried designing a new footer with the block editor, but it looks awful.
The menu block is also not what I used to have — only the main topics used to show unless you clicked to open the subheadings. There is a menu in the header that I can’t seem to get rid of.
Since this is the “free” version, I don’t have any plug ins to deactivate as a test. I also tried making a new home page as a static page but I still get the garbage. Does anyone have any ideas, short of creating a whole new site?
Thanks in advance
The blog I need help with is: (visible only to logged in users)
-
Very, very odd indeed! I’ve flagged your thread for Staff attention and assistance. Thanks for your patience while they get back to you.
-
Your site shows fine to me. Clear your browsercache and visit your site again. What browser and operating system are you using?
-
I cleared the cache — still there. In fact, it lost some of the design features of the theme (scratchpad). I tried an incognito window – same result. I tried using Edge — same result.
I am using Chrome on a PC running Windows 10, if that helps,
-
Hey @staartmees were you able to scroll down to the bottom of the original poster’s front page? When I looked at it earlier, everything below the the “Older Posts” button was a mess.

It’s even displaying a header called “Inactive Widgets”

It seems like there’s some errant code somewhere (dashboard?) that’s causing the code to appear on the front page.
@nubie1541 could you go to your Classic dashboard at https://stjohnknitandcrochet.wordpress.com/wp-admin/options-writing.php and check the box at the top under Formatting where it says “WordPress should correct invalidly nested XHTML automatically” and then save your changes at the bottom of that page. Let’s see if that doesn’t nudge something.
-
Ah @nubie1541, we cross-posted. Could you give my suggestion a try and let us know how that goes?
-
Hi, I tried making the change in the writing php area and there was no change in the look. The junk and messed up format is still there. :(
-
OK, thanks. It was a long shot.
Now we wait for Staff to reply to this forum thread. Thanks again for your patience.
-
-
Hey folks, thank you very much for your patience… that really is an odd one. I tend to agree it’s likely some errant code, maybe yours, maybe something breaking in blocks.
I tried designing a new footer with the block editor, but it looks awful.
@nubie1541 – did this problem start when you started designing the new footer?
And would you mind temporarily removing each widget, one at a time, til we discover which one is causing problems? I think one of them must be broken, but it’s tough to tell which one. If you want us to do it from our side, we can, too.
-
Also, I noticed a Table of Contents widget. Given those are meant to be in posts, I’d try removing that one first, for what it’s worth.
-
I deleted all the widgets from the bottom up, except for those that were currently in the sidebar.
The rogue code was in the fourth widget, which is the one with the table. So, now it looks ok.
I don’t know why that code showed up there, and why it was showing up on every page in the site, since the original sidebar was only on the front page.
Thanks for the suggestions; now I have to make it all look the way I would like.
I would very much like the posts on the front page to only be excerpts, with the full post on a posts page. Is this something that is theme related?
Thanks again!
-
Hi there! 👋🏼
I checked your site, and everything seems to be okay now — can you confirm this?
I would very much like the posts on the front page to only be excerpts, with the full post on a posts page. Is this something that is theme related?
Given that this theme is the Classic Theme, this can be configured from the “Reading Settings” by navigating to Settings → Reading and changing the “Full text” to “Excerpt” in the “For each post in a feed, include” section:

(if you can’t see the screenshot, click here)However, this is configured correctly, and the home page reflects this setting. ✅
-
Thanks for getting back to me.
The current theme is not what I really want — I would prefer Scratchpad, but it shows the full post. If I use Libretto, it shows and excerpt, but no link to the full post.
I will continue looking for a theme that does what I want it to do. Thanks for your help
-
Hello again, When Classic themes were the gold standard here, we recommended using the “More” tag to only show an excerpt on the front blog page if the theme itself didn’t give that option in the Customizer. That is now a block> https://wordpress.com/support/wordpress-editor/blocks/more-block/ You’ll need to add it manually where you want the break to occur.
- The topic ‘Random Code and Legacy Widgets’ is closed to new replies.