WordPress.org

Ready to get started?Download WordPress

Forums

Add PHP code to page. How to? (3 posts)

  1. gavinwatson
    Member
    Posted 4 years ago #

    Hi all,

    I would liek to add the following bit of code to a page that I have created with WordPress

    <?php
    
    		echo php_file_tree("archive/", "[link]")
    		?>

    But it is not working, I have doen it in HTML mode and added to the beginning and to the end so it looks like this:

    <code>
        <?php
    
    		echo php_file_tree("archive/", "[link]")
    		?>
    </code>

    But nothing.

    Can anyone help?

    Thanks.

  2. MichaelH
    Member
    Posted 4 years ago #

    You would need a plugin such as http://wordpress.org/extend/plugins/exec-php/ to put code in a post and/or page.

  3. gavinwatson
    Member
    Posted 4 years ago #

    Thank you for your reply, I will chech this out.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.