WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Sort
Having Fatal error: Call to undefined function have_post() (4 posts)

  1. itsmeka
    Member
    Posted 1 year ago #

    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/

  2. logikal16
    Member
    Plugin Author

    Posted 1 year ago #

    Look closer at your code.

    have_post() should be have_posts().

  3. vandana143
    Member
    Posted 1 year ago #

    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

  4. raghupathy
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic