Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter barbaricht

    (@barbaricht)

    Dear 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

    Thread Starter barbaricht

    (@barbaricht)

    Dear 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!

Viewing 2 replies - 1 through 2 (of 2 total)