Forums

php else if code problem (5 posts)

  1. aubderk
    Member
    Posted 10 months ago #

    I am working some php code and it had been functioning properly, and now all of a sudden it's not. Here's what I have:

    <?php if ( is_page( 'inmate-information' ) ) {
    echo '<a href="https://www.blackstone.edu/request-information/index.php?inmate=true" title="Request Info">Request Info</a>';
    } else if ( is_page( 'information-for-prison-inmates-and-their-sponsors-advanced-paralegal-courses' ) ) {
    echo '<a href="https://www.blackstone.edu/request-information/index.php?inmate=true" title="Request Info">Request Info</a>';
    } else {
    echo '<a href="http://www.blackstone.edu/request-info/" title="Request Information">Request Info</a>';
    } ?>

    This code is entered into a text widget under sidebar 1. Any advice?

    [Please post code snippets between backticks or use the code button.]

  2. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    You can't use PHP code in the basic Text widget.

  3. aubderk
    Member
    Posted 10 months ago #

    AH! I knew it was something simple I was overlooking. THANK YOU

  4. djmosoul
    Member
    Posted 10 months ago #

    But you can use PHP if you you install this plugin: http://wordpress.org/extend/plugins/php-code-widget/

  5. aubderk
    Member
    Posted 10 months ago #

    Thank you! I did get the php plugin and everything is working great now.

Reply

You must log in to post.

About this Topic

Tags