Comment tags in text widget
-
This is an odd issue.
On my website, I host stories that I’ve written, chapter by chapter. In order to make navigation a bit easier, I included a custom-made navigation widget that would allow any reader to jump to any chapter they wish.
Because there are four stories on this site, I configured four different widgets using the text widget, and set the visibility so readers only see the widget for the story they’re reading, based on the category.
But since all four widgets are labeled ‘Quick Nav’, it was difficult updating them, since I had to open each one until I found the one I was looking for.
That is until I thought of including HTML comment tags at the top of each widget with the appropriate label. I still have to open each one, but once I do, I can identify them at a glance.
Now, normally, I’ve noticed that WordPress won’t allow comment tags for some baffling reason, but I’m glad they do in the widgets.
That being said, I’ve hit a snag. You see, while placing a label with comment tags works great, for some reason, when I tried to comment out a link for a story I didn’t post yet, WordPress turned this:
<!--</li><li style="margin-left:4px;text-indent:-4px;"><a href="http://fanfiction.noprestige.com/2013/10/13/a-waking-dragon-chapter-nine-someone-to-lose/">Ch. 9 - Someone to Lose</a>-->Into this:
<!--</li><li style="margin-left:4px;text-indent:-4px;"><a href="http://fanfiction.noprestige.com/2013/10/13/a-waking-dragon-chapter-nine-someone-to-lose/">Ch. 9 - Someone to Lose</a>-->Yes, for some reason it converted the proper less-than/greater-than signs into their html-entity equivalent.
For some reason, it threw a conniption, and I want to know why!
The blog I need help with is: (visible only to logged in users)
-
Okay, perhaps I should clarify, since my demonstration apparently didn’t take, and I can’t preview or edit my posts here. This is what came out:
<!--</li><li style="margin-left:4px;text-indent:-4px;"><a href="http://fanfiction.noprestige.com/2013/10/13/a-waking-dragon-chapter-nine-someone-to-lose/">Ch. 9 - Someone to Lose</a>-->There, did that work!?
-
- The topic ‘Comment tags in text widget’ is closed to new replies.