I am using a voting plugin that only displays in single post page using the code below. However, i want to implement the same in the index.php page

        if ( is_singular(explode(',',$type))) 
        {   

            $voting_themes = get_option( 'voting_themes' );

            $voting_display = '';
            $voting_display .= $content;

            $voting_display .= '<div class="voting-container">';

            if($voting_themes== "flat")
                {
                    $voting_display.= voting_themes_flat(get_the_ID());
                }



            $voting_display .='</div>';



            return $voting_display;

        }
    else
        {
            return $content;
        }

    }
else
    {
        return $content;
    }

Read more here: How can i implement a voting plugin in wordpress?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: