Support » Fixing WordPress » disabling pagination on startpage

  • Hi, my theme uses templates for showing content and i need a static page as frontpage, there i do not want pagination, my template uses this code:
    <?php dt_paginator($blog_query); ?>
    is there a way to disable this, i guess it is with if and else but i´m not a coder

    please help

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Patrick Horemans

    (@winock)

    i did try this code
    <?php
    if(is_front_page()){
    echo “”;
    } else {
    echo “<?php dt_paginator($blog_query); ?>”;
    } ?>

    but this give me this error:

    Catchable fatal error: Object of class WP_Query could not be converted to string in …themes/dt-the7/template-blog-masonry.php on line 130

    Saurabh

    (@saurabhshukla)

    There’s error in your code, first up. See if that fixes it:

    <?php
    if(is_front_page()){
    echo "";
    } else {
    dt_paginator($blog_query);
    } ?>
    Saurabh

    (@saurabhshukla)

    Better still

    <?php
    if(!is_front_page()){
    dt_paginator($blog_query);
    }
    ?>

    Basically it says if it is not(!) frontpage, then show paginator.

    Thread Starter Patrick Horemans

    (@winock)

    Yes you are my lifesaver…
    thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘disabling pagination on startpage’ is closed to new replies.