خرید بک لینک

Vote count: 0

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>

asked 41 secs ago

برچسب: wordpress if statement,wordpress if statement page id,wordpress if statement page,wordpress if statement category,wordpress if statement homepage,wordpress if statement custom post type,wordpress if statement variable,wordpress multiple if statements,wordpress nested if statement,wordpress end if statement, نویسنده: استخدام کار تاريخ: چهارشنبه 10 شهريور 1395 ساعت: 8:31

صفحه بندی