This action hook executes in the page.php file and loads at the end of the_content() but before the loop endwhile
runs.
Use this hook when you want to output something at the bottom of a page, and want to use template tags like the_title() or the_permalink().
Usage
This hook provides no parameters. You use this hook by having your function echo output to the browser, or by having it perform background tasks. Your functions shouldn’t return, and shouldn’t take any parameters.
add_action( 'appthemes_after_page', 'your_function' ); |
Example: Share Link
You can use this hook to add meta data to a page, like a share link for social media sites.
<?php function insert_share_link() { echo '<div class="share-link">' . __( 'Share this link with your friends!', 'appthemes') . '<input type="text" value="' . esc_attr( get_permalink() ) . '">'; } add_action( 'appthemes_after_page', 'insert_share_link' ); ?> |
Changelog
- since 1.1
Source File
appthemes_after_page()
is located in page.php
.