fa fa-eye icon set up in child theme

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7737 Reply

    Robin

    Hello
    i use wp-post view plugin..
    i use frontire theme and use custom theme so i use this code
    add_action( ‘frontier_after_blog_post_byline’, ‘ra_postviews_byline’ );

    function ra_postviews_byline() { “fa fa-eye”> nbsp;
    if ( function_exists(‘the_views’) ) {
    the_views();
    }
    }

    i want also show fa fa-eye icon

    plugin admin says this solution for this
    if you are using font awesome, you can do something like that.

    <i class=”fa fa-eye”></i> <?php if(function_exists(‘the_views’)) { the_views(); } ?>

    So how can i use this on child theme

    #7740 Reply

    Ron
    Keymaster

    You can try and add this to your child theme’s functions.php

    add_action( 'frontier_after_blog_post_byline', 'ra_postviews_byline' );
    
    function ra_postviews_byline() {
    	if ( function_exists('the_views') ) {
    		echo '<i class="fa fa-eye"></i> ' . the_views( false );
    	}
    }
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: fa fa-eye icon set up in child theme
Your information: