Displaying HTML markup from Custom Field
-
I am pulling my hair out over here over what is probably a simple fix.
Here is what I am trying to do. Maybe it can’t even be done, I don’t know. That’s the problem ?? I know PHP, but I don’t know WP.
Anyway.. I am trying to add a custom field, per post (or page) that I can put HTML code in. Basically a client of mine wants to be able to add different ‘advertisement’ code to each page/post. I want that to show in the sidebar of the page.
So I went ahead and entered a new custom field called “custom_add_1”. Then, just for a quick sloppy solution I put into sidebar.php the typical “get_post_meta” code that I thought I was supposed to use to retrieve the content. However, nothing that contains any sort of HTML markup will show up.
For example, I put the following into the custom field value:
I am going to put an image here... Look.. there should be an image below <br><img src="https://content.linkoffers.net/SharedImages/Products/161564/509947.gif"><br> hey do you see the image above???
Everything, with the exception of the img src portion shows up.
So if anyone can please smack the back of my head and tell me what I am doing wrong here? I have been searching the net for 2 days now trying to find a solution, but everything I read says “oh yeah sure it should just work”.
Thanks for ANY help.
Derek
- The topic ‘Displaying HTML markup from Custom Field’ is closed to new replies.