WordPress.org

Support

Support » Plugins and Hacks » Advanced Custom Sort » [Plugin: Advanced Custom Sort] Having Fatal error: Call to undefined function have_post()

[Plugin: Advanced Custom Sort] Having Fatal error: Call to undefined function have_post()

  • Hey thanks for a nice and useful plugin. It works fine in admin panel but when i tried to view in template, i got Fatal Error message like “Call to undefined function have_post() in F:\xampp\htdocs\project\barta\wp-content\themes\twentytwelve\single.php on line 314”

    I have wrote following code to display:
    <?php $acs->query_posts(array(‘group_name’ => ‘Exclusive News’)); ?>
    <?php if(have_post()) while (have_posts()):the_post(); ?>
    <div><?php the_title(); ?></div>
    <?php endwhile; ?>

    Please help me to solve it.

    Thanks again.

    http://wordpress.org/extend/plugins/advanced-custom-sort/

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

    @logikal16

    Look closer at your code.

    have_post() should be have_posts().

    if i create a new php file in wordpress and using <?php if(have_post()) while (have_posts()):the_post(); ?> then call to undefined function have_post
    and call to undefined function get_header
    this error comes plz tell me the solution of it

    Hi, Thanks for nice plugin. It works fine in admin panel but when i tried to view in template, nothing happened. It remains as it is.

    <?php $acs->query_posts(array(‘group_name’=>’New Group’)); ?>
    <?php if(have_posts()) : while(have_posts()) : the_post();
    the_title();
    endwhile; endif;
    ?>

    Please help me.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Advanced Custom Sort] Having Fatal error: Call to undefined function have_post()’ is closed to new replies.
Skip to toolbar