appthemes_loop_else

This action hook executes in the loop-[post_type].php file and loads within the loop between else; and endif; runs.

Use this action when you want to output something when a user didn’t find the page he/she was looking for.

appthemes_loop_else();

Example: Redirect to Home Page

If your user didn’t find the page he was looking for, you can use this hook to give him a message or a link back to the home page.

<?php
function insert_home_page_link() { 
    echo '<a href="' . esc_attr( home_url() ) . '">' . __( 'Return to Home', 'appthemes' ) . '</a>.';
}
add_action( 'appthemes_loop_else', 'insert_home_page_link' ); 
?>

Changelog

  • since 1.1

Source File

appthemes_loop_else() is located in loop-[post_type].php.

Your rating: none
Rating: 0 - 0 votes

Popular Add-ons

AppThemes Coupons

Start offering coupons and promotions to your customers.


(14)
$29

Home Control for Vantage

Widgetized Vantage home page including a grid view for easier control.


(10)
$29

Classy

A modern, clean & fully featured child theme for ClassiPress


(7)
$49