i have homepage with 2 buttons that show up How it works Sign up
here is the php code i have and i beleive html code
<?php
$PricerrTheme_enable_how_it_works = get_option('PricerrTheme_enable_how_it_works');
if($PricerrTheme_enable_how_it_works != "no"):
$hthing = get_bloginfo('url'). '/wp-login.php?action=register';
if(is_user_logged_in())
$hthing = PricerrTheme_post_new_link();
$Pricerr_main_how_it_works_link = get_option('Pricerr_main_how_it_works_link');
if(!empty($Pricerr_main_how_it_works_link))
{
$hthing = $Pricerr_main_how_it_works_link;
}
?>
<div class="main_graphic">
<div class="main_graphic_ier">
<div class="test_line_1"><?php echo stripslashes(get_option('Pricerr_main_how_it_works_line1')) ?></div>
<div class="test_line_2"><?php echo stripslashes(get_option('Pricerr_main_how_it_works_line2')) ?></div>
<div class="test_line_3">
<ul class="duo_buttons">
<li class="lft"><a href="<?php echo get_option('PricerrTheme_button_1_link') ?>"><?php echo get_option('PricerrTheme_button_1_caption') ?></a></li>
<li class="rght"><a href="<?php echo get_option('PricerrTheme_button_2_link') ?>"><?php echo get_option('PricerrTheme_button_2_caption') ?></a></li>
</ul>
</div>
</div>
</div>
<?php endif; endif; ?>
were the code shows
<ul class="duo_buttons">
<li class="lft"><a href="<?php echo get_option('PricerrTheme_button_1_link') ?>"><?php echo get_option('PricerrTheme_button_1_caption') ?></a></li>
<li class="rght"><a href="<?php echo get_option('PricerrTheme_button_2_link') ?>"><?php echo get_option('PricerrTheme_button_2_caption') ?></a></li>
</ul>
am trying to use if statement like this but it dont work it shows my if statement on page instead.
if ( is_user_logged_in() ) {
} else {
<ul class="duo_buttons">
<li class="lft"><a href="<?php echo get_option('PricerrTheme_button_1_link') ?>"><?php echo get_option('PricerrTheme_button_1_caption') ?></a></li>
<li class="rght"><a href="<?php echo get_option('PricerrTheme_button_2_link') ?>"><?php echo get_option('PricerrTheme_button_2_caption') ?></a></li>
</ul>
}
and here is the full code edited
<?php
$PricerrTheme_enable_how_it_works = get_option('PricerrTheme_enable_how_it_works');
if($PricerrTheme_enable_how_it_works != "no"):
$hthing = get_bloginfo('url'). '/wp-login.php?action=register';
if(is_user_logged_in())
$hthing = PricerrTheme_post_new_link();
$Pricerr_main_how_it_works_link = get_option('Pricerr_main_how_it_works_link');
if(!empty($Pricerr_main_how_it_works_link))
{
$hthing = $Pricerr_main_how_it_works_link;
}
?>
<div class="main_graphic">
<div class="main_graphic_ier">
<div class="test_line_1"><?php echo stripslashes(get_option('Pricerr_main_how_it_works_line1')) ?></div>
<div class="test_line_2"><?php echo stripslashes(get_option('Pricerr_main_how_it_works_line2')) ?></div>
<div class="test_line_3">
if ( is_user_logged_in() ) {
} else {
<ul class="duo_buttons">
<li class="lft"><a href="<?php echo get_option('PricerrTheme_button_1_link') ?>"><?php echo get_option('PricerrTheme_button_1_caption') ?></a></li>
<li class="rght"><a href="<?php echo get_option('PricerrTheme_button_2_link') ?>"><?php echo get_option('PricerrTheme_button_2_caption') ?></a></li>
</ul>
</div>
</div>
}
</div>
