barbaricht
Forum Replies Created
-
Forum: Hacks
In reply to: how do you stop visual editor from striping or changing ">" php codeDear bcworkz,
thank you for you comments! To answer your questions starting with the first: the php code won’t work with code blocks. The visual editor still changes < > to character entities even though they are wrapped in code blocks.
The short code idea i like. I don’t know anything about short code because i just starting learning wordpress a month ago. So i take a look at it.
lastly, i’m a web developer by profession and i use many programming languages. I could never only use html.
-tony
Forum: Hacks
In reply to: how do you stop visual editor from striping or changing ">" php codeDear James,
Thank you for your response. My goal was not hardcode absolute URL’s for image tags. As a result, I added image tags in this way below using the HTML editor:
<img src=”<?php echo site_url(); ?>/wp-content/uploads/2012/11/newsletter.png” />I did this because i will be uploading a local/development wordpress website to production on the Interent using a different domain name.
This method worked fine, until i switch to the visual editor, which change the php code as described in the above posts.
And yes i’m using a plugin that allow me to add php code in the HTML editor. The name of plug-in is “PHP Code for posts”.
thank you!