• Resolved iceq

    (@iceq)


    Hey

    I use the tag ?php comments_popup_link in my theme template to display comments count. I want that to appear exclusively for registered (logged in) users. How can I do so ?

    Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter iceq

    (@iceq)

    Anybody ?

    With a simple conditional statement?

    <?php
    if( is_user_logged_in() ) {
     // Comment code here
    }
    ?>

    Thread Starter iceq

    (@iceq)

    Thank you. I think that is what I am looking for.
    Yet I tried to implement it into my index.php, but after applying it the page fails to load.

    Here is my current comments code, please tell me how it must be after I add to it the code above :

    <span class="comm"> والردود: <?php comments_popup_link('أضف أول رد', 'رد واحد', 'مجموعها %'); ?> </span>

    I’ll make it a little easier for you… 😉

    <?php if( is_user_logged_in() ) : ?>
    
    put your code here.
    
    <?php endif; ?>
    Thread Starter iceq

    (@iceq)

    that did it. Thank you very much for your assistance.

    You’re welcome.. 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘display comments count ONLY for registered users’ is closed to new replies.