Forums

[resolved] Adding code to static page body (4 posts)

  1. drabina
    Member
    Posted 3 years ago #

    I have static page that has text intro under which I would like to display list of categories. I was pointed to the "wp_list_categories" function that will give me what I need. My question is, can I use that directly on the page edit screen? When I type:

    <?php
    wp_list_categories('orderby=name'); ?>

    I get just the code text on the final page. No categories. And yes, I am using HTML mode for the text editor.

    Thanks.

  2. Shane G
    Member
    Posted 3 years ago #

    Hi,

    You can add the code in the static page of wordpress and if you are receiving any error message then provide it...

    Thanks,

    Shane G.

  3. drabina
    Member
    Posted 3 years ago #

    I am not receiving any error messages. It is that the page prints my PHP code without actually parsing and executing it.

  4. drabina
    Member
    Posted 3 years ago #

    Figured it out. I needed plugin Exec-PHP.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.