[resolved] Theme Options Page, and IF statements... (2 posts)

  1. kennethwatt
    Posted 6 years ago #

    Evening all :)
    I have a theme options page, and wish to call for the following in my page:

    <?php $announce = get_option('zftheme_announcement_active'); ?>
    <?php if ($announce == "true"){ ?>
    <a href="<?php echo stripslashes(get_option('zftheme_announcement_link')); ?>"><?php echo stripslashes(get_option('zftheme_announcement_text')); ?></a>
    <? }; ?>
    <?php if ($announce == "false"){ ?>
    <?php echo stripslashes(get_option('zftheme_announcement_text')); ?>
    <? }; ?>

    So basically, if announce is true, to display it as a link, and if announce is false, then to display it as just old plain text.
    Hope you understand.
    Thanks in advance,
    Kenneth :)

  2. kennethwatt
    Posted 6 years ago #

    Sorry error on my behalf - something funny in the functions.php file.

Topic Closed

This topic has been closed to new replies.

About this Topic