• marner

    (@marner)


    Hi all,

    I’m converting my existing site in wordpress theme and I copy pasted some html codes in wordpress text editor and everything displays as it supposed to but when I write php code in my text editor it doesn’t read it as php code.

    for example, I have this image with a link

    <a href="#"><img src="https://localhost/wordpress/wp-content/themes/1000MilesBand/images/eng_flag.jpg" alt="english flag" /></a>:

    and when I add php code to open a specific wordpress page when clicked:

    <a href="<?php echo get_permalink(get_page_by_title('About'));"><img src="https://localhost/wordpress/wp-content/themes/1000MilesBand/images/eng_flag.jpg" alt="english" /></a>

    the image disappears…

    but this code actually works in my header.php file, it only does not work when I write it in wordpress page text editor window,

    any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘text editor doesn't read php code’ is closed to new replies.