• Resolved Dpo17

    (@dpo17)


    Hi! I can not bring my views in the topic.

    Here is the code from single.php of theme:

    $output .= '<div class="post-links">';
    if( comments_open() ) $output .= '<i class="icon-eye"></i> <a href="'. get_comments_link() .'" class="post-comments">'. get_comments_number() .'</a>';
    									$output .= '<i class="icon-doc-text"></i> <a href="'. get_permalink() .'" class="post-more">'. $translate['readmore'] .'</a>';
    $output .= '</div>';

    I need to display views instead get_comments_number (), but when I insert <? Php if (function_exists (‘the_views’)) {the_views (); }?> Site stops working.

    What you need to do to earn?

    https://ww.wp.xz.cn/plugins/wp-postviews/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Lester Chan

    (@gamerz)

    $output .= '<div class="post-links">';
    if( comments_open() ) $output .= '<i class="icon-eye"></i> <a href="'. get_comments_link() .'" class="post-comments">'. the_views() .'</a>';
    $output .= '<i class="icon-doc-text"></i> <a href="'. get_permalink() .'" class="post-more">'. $translate['readmore'] .'</a>';
    $output .= '</div>';
    Thread Starter Dpo17

    (@dpo17)

    I have tried so, but does not work. There are other options?

    Plugin Author Lester Chan

    (@gamerz)

    I have removed the if( comments_open() )`

    Try:

    $output .= '<div class="post-links">';
    $output .= '<i class="icon-eye"></i> <a href="'. get_comments_link() .'" class="post-comments">'. the_views() .'</a>';
    $output .= '<i class="icon-doc-text"></i> <a href="'. get_permalink() .'" class="post-more">'. $translate['readmore'] .'</a>';
    $output .= '</div>';

    If it doesn’t work, contact your theme author.

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

The topic ‘Help with output plugin’ is closed to new replies.