WordPress.org

Ready to get started?Download WordPress

Forums

Top 10 - Popular posts plugin for WordPress
[resolved] Probleme with php (3 posts)

  1. jetaisriche
    Member
    Posted 1 year ago #

    Hey,

    Thanks for this great plugin !

    I wanna display it only on the first page (home page) So i use this :

    <?php
    
    wp_reset_query();
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    if ($page ==1)  {
    echo '
    if(function_exists('tptn_show_pop_posts')) tptn_show_pop_posts();
    ';
    }
    ?>

    But i have a syntax error with the '

    here ('tptn_show_pop_posts'))

    Do u have a solution ?

    http://wordpress.org/extend/plugins/top-10/

  2. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    What is the error that PHP is throwing up?

  3. jetaisriche
    Member
    Posted 1 year ago #

    Dont worry i found the solution

    <?php
    
    wp_reset_query();
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    if ($page ==1)  {
    if(function_exists('tptn_show_pop_posts')) tptn_show_pop_posts();
    }
    ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.