WordPress.org

Forums

Frontier
[resolved] Show no display social icons on Home (3 posts)

  1. M3
    Member
    Posted 1 year ago #

    Hello,

    I'm planning to using Easy Social Icons for my site. They have this php tag <?php if ( function_exists('cn_social_icon') ) echo cn_social_icon(); ?> to display the social icons.

    So I add the code on loop-single.php, just above the php content. When I try the code it works nicely and display as it should, but since I use static page for my home page, the social icons also appear on all the other pages including the front page.

    I only want the social icons appear on the single post and not on the pages.

    Will it be possible to make this exception using the code above?

    Thanks you very much for your help.

  2. ronangelo
    Member
    Theme Author

    Posted 1 year ago #

    Don't edit the theme files. Install these two plugins:
    http://wordpress.org/plugins/php-code-widget/
    http://wordpress.org/plugins/widget-logic/

    Add the code you have on a PHP Widget then place it on the Post – Before Content widget area. Then use is_single() condition on the widget logic part of the widget.

  3. M3
    Member
    Posted 1 year ago #

    Very nice! It worked like magic! :)

    Thank you Sir.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic