Support » Plugin: YOP Poll » [yop_poll_archive]

  • Resolved Piani


    3 questions I can not find the answer to:

    1. Can I change the sorting to decending on [yop_poll_archive] page? I want the newest poll on top and the oldest at the bottom.

    2. Can there be a nice divider or some more space between the polls at the [yop_poll_archive] page. They are hard to separate in my 2011 theme.

    3. What file is used to create the [yop_poll_archive]? Can this be edited to solve the above questions? Or is there a standard sullotion?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author YOP


    Hi wm,

    1. Edit public-admin.php and look for this function

    public function yop_poll_archive_shortcode_function() {

    $archive = YOP_POLL_MODEL::get_archive_polls( ‘archive_order’, ‘asc’,
    $archive = YOP_POLL_MODEL::get_archive_polls( ‘date_added’, ‘desc’,

    $total_archive = ceil( count( YOP_POLL_MODEL::get_archive_polls( ‘archive_order’, ‘asc’,
    $total_archive = ceil( count( YOP_POLL_MODEL::get_archive_polls( ‘date_added’, ‘desc’,

    2. Just like for the previous question, edit public-admin.php and look for public function yop_poll_archive_shortcode_function() {

    Where you have

    if ( count( $archive ) > 0 ) {
    foreach( $archive as $poll ) {
    $template .= $this->return_yop_poll( $poll[‘id’] );

    replace $template .= $this->return_yop_poll( $poll[‘id’] ); with

    $template .= $this->return_yop_poll( $poll[‘id’] ).'[your_theme_poll_separator_html_code]’;

    where [your_theme_poll_separator_html_code] (and this answers your 3rd question as well) is the html code you want to use to separate the polls.

    Best wishes,

    YOP Team



    Thanks YOP Team

    The instructions you provided above solved all my questions and the result is exactly the design I requested!

    $template .= $this->return_yop_poll( $poll['id'] ).'<img src="http://separator_image.png" style="padding:10px;">';

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[yop_poll_archive]’ is closed to new replies.