Viewing 2 replies - 1 through 2 (of 2 total)
  • I was wanting the exact same thing and found this worked for me:

    deactivate plugin (it will crash if you dont)

    go to editing window for plugin for:
    posts-in-page/lib/page_posts.php

    add in

    else :
    $output .='<div class="empty">no posts available</div>';

    right above

    endif;
    wp_reset_potsdata();

    (so it becomes new line 39&40)

    reactivate plugin

    now you can also edit your css to the class ’emtpy’ to style the message if required.

    Hope this helps.

    Hi, thank you! This works perfectly. However, it’s actually right above

    endif;
    wp_reset_postdata();

    not ‘potsdata()’

    you saved my weekend!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Display a message if a category is empty’ is closed to new replies.