Display HTML on sidebar
-
I would like to include a section on my sidebar under my blog button with HTML code so that other bloggers can link to my page. However, whenever I include HTML it transfers it into code rather than display the HTML. Is there a way I can display the HTML?
Blog url: http://obscuredvixen.wordpress.com/ -
That would depending on the type of code you’re trying to add. We do filter out some for security purposes, specifically JavaScript and iFrames.
Where are you getting the code from?
-
I wrote the code myself, and it’s HTML. However when I try and get others to use my code, it appears as the image and link instead of the code. Is there a way to display the code for the button and link without it displaying as HTML for others to use?
-
-
oops! the link actually linked. Here it is again:
< a href=” http://obscuredvixen.wordpress.com/ “><img src=”http://obscuredvixen.files.wordpress.com/2011/08/the_obscured_vixen_button_175.jpg”>
-
Can you try copying and pasting the following into your Text Widget?
[sourcecode language="html"]<a href="http://obscuredvixen.wordpress.com/"> <img src="http://obscuredvixen.files.wordpress.com/2011/08/the_obscured_vixen_button_175.jpg">[/sourcecode] -
That kind of worked!!! I added the code, but it shows the code lines and buttons on hover.
http://obscuredvixen.wordpress.com/ [button in the left nav]
-
Hi there,
Unfortunately, using the [sourcecode] tag is the best way to display HTML code on your site. Typically, this tag is used to share code in a blog post, rather than a Sidebar.
Because the Sidebar width is smaller than a blog post, the display for your code is a little different. However, if users click on the first button that pops up when you hover over the code, it appears, in full, in a pop up window. I hope this helps!
-
- The topic ‘Display HTML on sidebar’ is closed to new replies.