Tag Display If Empty
Display message if there are no any posts.
Example
<?php
display_if_empty( array (
'before' => '<p class="msg_nothing">',
'after' => '</p>',
'msg_empty' => 'Sorry, there is nothing to display...'
) );
?>
Parameters
- Name: before
- Deafult: ‘<p class="msg_nothing">’
- Usage: Displayed before message.
- Name: after
- Deafult: ‘</p>’
- Usage: Displayed after message.
- Name: msg_empty
- Deafult: ‘Sorry,
- Usage: there is nothing to display…’ Default message text to display.
Return value
This function return false, if there are no any posts.<br/>
If there are some posts then this function return true and displays content.