-
Notifications
You must be signed in to change notification settings - Fork 39
rtPanel Hooks
Used to add style/scripts after wp_head hook before closing of head tag.
function custom_rtp_head() { ?>
<p>This code is call after wp_head hook and before closing of head tag. </p><?php
}
add_action( 'rtp_head', 'custom_rtp_head' );
Adds content at the beginning of the body tag.
function custom_rtp_hook_begin_body() { ?>
<p>This is the beginning of body tag.</p><?php
}
add_action( 'rtp_hook_begin_body', 'custom_rtp_hook_begin_body' );
Adds content at the beginning of the #main-wrapper.
function custom_rtp_hook_begin_main_wrapper() { ?>
<p>This is the beginning of #main-wrapper.</p><?php
}
add_action( 'rtp_hook_begin_main_wrapper', 'custom_rtp_hook_begin_main_wrapper' );
Adds content at the beginning of the header (.rtp-header)
function custom_rtp_hook_begin_header() { ?>
<p>This is the begin of .rtp-header</p><?php
}
add_action( 'rtp_hook_begin_header', 'custom_rtp_hook_begin_header' );
Adds content at the end of the .rtp-header div.
function custom_rtp_hook_end_header() { ?>
<p>This is the end of .rtp-header</p><?php
}
add_action( 'rtp_hook_end_header', 'custom_rtp_hook_end_header' );
Used to add content before header ( #header ).
Used to add content after header ( #header ). By default rtPanel uses this hook to show the nav menu/page list.
function custom_hook_after_header() { ?>
<p>This is after #header</p><?php
}
add_action( 'rtp_hook_after_header', 'custom_hook_after_header' );
function remove_parent_actions() {
remove_action( 'rtp_hook_after_header','rtp_default_nav_menu' );
}
add_action( 'init', 'remove_parent_actions' );
Status API Training Shop Blog About Pricing
function custom_hook_before_header() { ?>
<p>This is before #header</p><?php
}
add_action( 'rtp_hook_before_header', 'custom_hook_before_header' );
Adds content before site logo.
function custom_hook_before_logo() { ?>
<p>This is before Logo</p><?php
}
add_action( 'rtp_hook_before_logo', 'custom_hook_before_logo' );
Adds content after site logo.
function custom_hook_after_logo() { ?>
<p>This is after Logo</p><?php
}
add_action( 'rtp_hook_after_logo', 'custom_hook_after_logo' );
Adds content at the before primary navigation.
function custom_rtp_hook_begin_primary_menu() { ?>
<p>This content add before primary navigation.</p><?php
}
add_action( 'rtp_hook_begin_primary_menu', 'custom_rtp_hook_begin_primary_menu' );
Adds content after primary navigation.
function custom_rtp_hook_end_primary_menu() { ?>
<p>This content add after primary navigation.</p><?php
}
add_action( 'rtp_hook_end_primary_menu', 'custom_rtp_hook_end_primary_menu' );
Adds content after end of #header-wrapper and before #content-wrapper.
function custom_rtp_hook_before_content_wrapper() { ?>
<p>This content is before #content-wrapper.</p><?php
}
add_action( 'rtp_hook_before_content_wrapper', 'custom_rtp_hook_before_content_wrapper' );
Adds content at the beginning of #content-wrapper.
function custom_hook_begin_content_wrapper() { ?>
<p>This is the beginning of #content-wrapper</p><?php
}
add_action( 'rtp_hook_begin_content_wrapper', 'custom_hook_begin_content_wrapper' );
Adds content at the beginning of #content.
function custom_hook_begin_content() { ?>
<p>This is the beginning of #content</p><?php
}
add_action( 'rtp_hook_begin_content', 'custom_hook_begin_content' );
Adds content at the end of #content.
function custom_hook_end_content() { ?>
<p>This is the end of #content</p><?php
}
add_action( 'rtp_hook_end_content', 'custom_hook_end_content' );
Adds content at the beginning of every .post.
function custom_hook_begin_post() { ?>
<p>This is the beginning of .post</p><?php
}
add_action( 'rtp_hook_begin_post', 'custom_hook_begin_post' );
Adds content at the end of every .post.
function custom_hook_end_post() { ?>
<p>This is the end of .post</p><?php
}
add_action( 'rtp_hook_end_post', 'custom_hook_end_post' );
Adds content before every post's title.
function custom_hook_begin_post_title() { ?>
<p>This is before post's title</p><?php
}
add_action( 'rtp_hook_begin_post_title', 'custom_hook_begin_post_title' );
Adds content after every post's title.
function custom_hook_end_post_title() { ?>
<p>This is after post's title</p><?php
}
add_action( 'rtp_hook_end_post_title', 'custom_hook_end_post_title' );
Adds content after .post-title. This is mainly used for the post meta.
function custom_hook_post_meta_top() { ?>
<p>This is post meta top</p><?php
}
add_action( 'rtp_hook_post_meta_top', 'custom_hook_post_meta_top' );
Adds content before Top Post Meta Box. Depends on the default applied rtp_hook_post_meta_top hook.
function custom_hook_begin_post_meta_top() { ?>
<p>This is before Top Post Meta Box</p><?php
}
add_action( 'rtp_hook_begin_post_meta_top', 'custom_hook_begin_post_meta_top' );
Adds content after Top Post Meta Box. By default rtPanel uses this hook to show the edit link. Depends on the default applied rtp_hook_post_meta_top hook.
function custom_hook_end_post_meta_top() { ?>
<p>This is after Top Post Meta Box</p><?php
}
add_action( 'rtp_hook_end_post_meta_top', 'custom_hook_end_post_meta_top' );
Adds content before Bottom Post Meta Box. Depends on the default applied rtp_hook_post_meta_bottom hook.
function custom_hook_begin_post_meta_bottom() { ?>
<p>This is before Bottom Post Meta Box</p><?php
}
add_action( 'rtp_hook_begin_post_meta_bottom', 'custom_hook_begin_post_meta_bottom' );
Adds content after Bottom Post Meta Box. Depends on the default applied rtp_hook_post_meta_bottom hook.
function custom_hook_end_post_meta_bottom() { ?>
<p>This is after Bottom Post Meta Box</p><?php
}
add_action( 'rtp_hook_end_post_meta_bottom', 'custom_hook_end_post_meta_bottom' );
Adds content to the beginning of post content (.post-content).
function custom_hook_begin_post_content() { ?>
<p>This is the before Post Content</p><?php
}
add_action( 'rtp_hook_begin_post_content', 'custom_hook_begin_post_content' );
Adds content to the end of post content (.post-content).
function custom_hook_end_post_content() { ?>
<p>This is the after Post Content</p><?php
}
add_action( 'rtp_hook_end_post_content', 'custom_hook_end_post_content' );
This hook holds the comments template section.
This hook adds the content after author gravatar in comment section.
function custom_rtp_hook_after_comment_author_avatar() { ?>
<p>This is content after author gravatar.</p><?php
}
add_action( 'rtp_hook_after_comment_author_avatar', 'custom_rtp_hook_after_comment_author_avatar' );
This hook holds the pagination of single post template.
This hook holds the pagination of all archive templates.
Adds content at the end of #content-wrapper.
function custom_hook_end_content_wrapper() { ?>
<p>This is the end of #content-wrapper</p><?php
}
add_action( 'rtp_hook_end_content_wrapper', 'custom_hook_end_content_wrapper' );
Adds content after end of #content-wrapper.
function custom_rtp_hook_after_content_wrapper() { ?>
<p>This content is after #content-wrapper.</p><?php
}
add_action( 'rtp_hook_after_content_wrapper', 'custom_rtp_hook_after_content_wrapper' );
This hook adds content after the end of #content, also it holds the sidebar.
function custom_rtp_hook_sidebar() { ?>
<p>This content is after #content.</p><?php
}
add_action( 'rtp_hook_sidebar', 'custom_rtp_hook_sidebar' );
Adds content at the beginning of the Sidebar (#sidebar).
function custom_hook_begin_sidebar() { ?>
<p>This is at the beginning of the Sidebar</p><?php
}
add_action( 'rtp_hook_begin_sidebar', 'custom_hook_begin_sidebar' );
This hook adds content in the right sidebar if widgets are not active. It shows static text, instead of showing blank sidebar.
function custom_rtp_hook_sidebar_content() { ?>
<p>This content will show, when right sidebar widgets are not present.</p><?php
}
add_action( 'rtp_hook_sidebar_content', 'custom_rtp_hook_sidebar_content' );
Adds content at the end of the Sidebar (#sidebar).
function custom_hook_end_sidebar() { ?>
<p>This is at the end of the Sidebar</p><?php
}
add_action( 'rtp_hook_end_sidebar', 'custom_hook_end_sidebar' );
Adds content before Footer (#footer).
function custom_hook_before_footer() { ?>
<p>This is the before Footer</p><?php
}
add_action( 'rtp_hook_before_footer', 'custom_hook_before_footer' );
Adds content after Footer (#footer).
function custom_hook_after_footer() { ?>
<p>This is the after Footer</p><?php
}
add_action( 'rtp_hook_after_footer', 'custom_hook_after_footer' );
Adds content at the beginning of #footer-wrapper.
function custom_rtp_hook_begin_footer() { ?>
<p>This is the beginning of #footer-wrapper.</p><?php
}
add_action( 'rtp_hook_begin_footer', 'custom_rtp_hook_begin_footer' );
Adds content at the end of #footer-wrapper.
function custom_rtp_hook_end_footer() { ?>
<p>This is the end of #footer-wrapper.</p><?php
}
add_action( 'rtp_hook_end_footer', 'custom_rtp_hook_end_footer' );
Adds content to the end of #main-wrapper.
function custom_rtp_hook_end_main_wrapper() { ?>
<p>This is the end of #main-wrapper.</p><?php
}
add_action( 'rtp_hook_end_main_wrapper', 'custom_rtp_hook_end_main_wrapper' );
Adds content at the end of body tag.
function custom_rtp_hook_end_body() { ?>
<p>This is the end of body tag.</p><?php
}
add_action( 'rtp_hook_end_body', 'custom_rtp_hook_end_body' );
Modifies the width of the header image under Appearance-> Header. Default is 960.
function custom_rtp_header_image_width( $width ) {
return 900;
}
add_filter( 'rtp_header_image_width', 'custom_rtp_header_image_width' );
Modifies the height of the header image under Appearance-> Header. Default is 190.
function custom_rtp_header_image_height( $height ) {
return 100;
}
add_filter( 'rtp_header_image_height', 'custom_rtp_header_image_height' );
Modify search box placeholder text in search form.
function custom_rtp_search_placeholder() {
return "Search here";
}
add_filter( 'rtp_search_placeholder', 'custom_rtp_search_placeholder' );
Modify author gravatar size on comment list.
function custom_rtp_gravatar_size() {
return 64;
}
add_filter( 'rtp_gravatar_size', 'custom_rtp_gravatar_size' );
Support for mobile navigation style. default is return " rtp-mobile-nav";
. If don't want to show mobile navigation style then use return "";
in following code.
function custom_rtp_mobile_nav_support() {
return " rtp-mobile-nav";
}
add_filter( 'rtp_mobile_nav_support', 'custom_rtp_mobile_nav_support' );
Modifies the depth of the primary nav menu. Default is 4.
function custom_rtp_nav_menu_depth( $depth ) {
return 2;
}
add_filter( 'rtp_nav_menu_depth', 'custom_rtp_nav_menu_depth' );
Modifies the default image path. This image will be shown in case the post has no featured image or image in its content. Default is none.
function custom_rtp_default_image_path( $image_path ) {
return 'http://rtcamp.com/wp-content/themes/rtpanel/img/rtpanel-logo.jpg';
}
add_filter( 'rtp_default_image_path', 'custom_rtp_default_image_path' );
Modifies read more text. By default rtPanel uses this hook to surround the read more text with curly brackets. Default value is the Read More Text Theme Option.
function custom_rtp_readmore( $readmore_text ) {
return '('.$readmore_text.')';
}
add_filter( 'rtp_readmore', 'custom_rtp_readmore' );
function remove_parent_filters() {
remove_filter( 'rtp_readmore','rtp_readmore_braces' );
}
add_action( 'init', 'remove_parent_filters' );
Modify images sibling count on image attachment page template, default is 10.
function custom_rtp_image_sibling_count() {
return 20;
}
add_filter( 'rtp_image_sibling_count', 'custom_rtp_image_sibling_count' );
Modify viewport setting of meta tag present in the header.
function custom_rtp_viewport() {
return "width=1024";
}
add_filter( 'rtp_viewport', 'custom_rtp_viewport' );
Add extra class for the content wrapper.
function custom_rtp_content_wrapper_class() {
return "rtp-content-wrapper rtp-section-wrapper my-custom-class";
}
add_filter( 'rtp_content_wrapper_class', 'custom_rtp_content_wrapper_class' );
Modify author placeholder text in comment form.
function custom_rtp_author_placeholder() {
return "Enter Name here";
}
add_filter( 'rtp_author_placeholder', 'custom_rtp_author_placeholder' );
Modify email placeholder text in comment form.
function custom_rtp_email_placeholder() {
return "Enter Email Here";
}
add_filter( 'rtp_email_placeholder', 'custom_rtp_email_placeholder' );
Modify website placeholder text in comment form.
function custom_rtp_url_placeholder() {
return "Enter Website URL";
}
add_filter( 'rtp_url_placeholder', 'custom_rtp_url_placeholder' );
Modify the comment textarea placeholder text.
function custom_rtp_comment_placeholder() {
return "Comment here...";
}
add_filter( 'rtp_comment_placeholder', 'custom_rtp_comment_placeholder' );
Add or modify class for sidebar container.
function custom_rtp_set_sidebar_grid_class() {
return "large-4 columns custom-sidebar-grid-class";
}
add_filter( 'rtp_set_sidebar_grid_class', 'custom_rtp_set_sidebar_grid_class' );
Add or modify class for content area.
function custom_rtp_set_content_grid_class() {
return "large-8 columns custom-content-class";
}
add_filter( 'rtp_set_content_grid_class', 'custom_rtp_set_content_grid_class' );
Add or modify full width template grid class.
function custom_rtp_set_full_width_grid_class() {
return "large-12 columns rtp-full-width-grid custom-full-width-grid-class";
}
add_filter( 'rtp_set_full_width_grid_class', 'custom_rtp_set_full_width_grid_class' );
Add or modify footer widgets class.
function custom_rtp_set_footer_widget_grid_class() {
return "large-3 small-6 columns custom-footer-widget-class";
}
add_filter( 'rtp_set_footer_widget_grid_class', 'custom_rtp_set_footer_widget_grid_class' );
Use following filter to remove bbPress plugin support
function custom_rtp_show_bbpress_support(){
return false;
}
add_filter( 'rtp_show_bbpress_support', 'custom_rtp_show_bbpress_support' );
=========================
Use following filter to remove BuddyPress plugin support
function custom_rtp_show_buddypress_support(){
return false;
}
add_filter( 'rtp_show_buddypress_support', 'custom_rtp_show_buddypress_support' );
=========================
Use following filter to remove Contact Form 7 plugin support
function custom_rtp_show_cf7_support(){
return false;
}
add_filter( 'rtp_show_cf7_support', 'custom_rtp_show_cf7_support' );
=========================
Use following filter to remove Ninja Forms plugin support
function custom_rtp_show_ninjaform_support(){
return false;
}
add_filter( 'rtp_show_ninjaform_support', 'custom_rtp_show_ninjaform_support' );
=========================
Use following filter to remove JetPack plugin support
function custom_rtp_show_jetpack_support(){
return false;
}
add_filter( 'rtp_show_jetpack_support', 'custom_rtp_show_jetpack_support' );
=========================
Use following filter to remove Regenerate Thumbnails plugin support
function custom_rtp_show_regenerate_support(){
return false;
}
add_filter( 'rtp_show_regenerate_support', 'custom_rtp_show_regenerate_support' );
=========================
Use following filter to remove rtMedia plugin support
function custom_rtp_show_rtmedia_support(){
return false;
}
add_filter( 'rtp_show_rtmedia_support', 'custom_rtp_show_rtmedia_support' );
=========================
Use following filter to remove rtPanel Hooks Editor plugin support
function custom_rtp_show_rtpanelhooks_support(){
return false;
}
add_filter( 'rtp_show_rtpanelhooks_support', 'custom_rtp_show_rtpanelhooks_support' );
=========================
Use following filter to remove rtSocial plugin support
function custom_rtp_show_rtsocial_support(){
return false;
}
add_filter( 'rtp_show_rtsocial_support', 'custom_rtp_show_rtsocial_support' );
=========================
Use following filter to remove rtWidgets plugin support
function custom_rtp_show_rtwidgets_support(){
return false;
}
add_filter( 'rtp_show_rtwidgets_support', 'custom_rtp_show_rtwidgets_support' );
=========================
Use following filter to remove Subscribe To Comments Reloaded plugin support
function custom_rtp_show_subscribecomments_support(){
return false;
}
add_filter( 'rtp_show_subscribecomments_support', 'custom_rtp_show_subscribecomments_support' );
=========================
Use following filter to remove WooCommerce plugin support
function custom_rtp_show_woocommerce_support(){
return false;
}
add_filter( 'rtp_show_woocommerce_support', 'custom_rtp_show_woocommerce_support' );
=========================
Use following filter to remove WordPress SEO by Yoast plugin support
function custom_rtp_show_wordpressseo_support(){
return false;
}
add_filter( 'rtp_show_wordpressseo_support', 'custom_rtp_show_wordpressseo_support' );
=========================
Use following filter to remove Yet Another Related Posts Plugin (YARPP) plugin support
function custom_rtp_show_yarpp_support(){
return false;
}
add_filter( 'rtp_show_yarpp_support', 'custom_rtp_show_yarpp_support' );
rtPanel:
- End-User Documentation
- Developer Documentation
- General
- Customizing Image Sliders in rtPanel Child Theme
- Add Google ad-banner above logo in rtPanel
- Customize rtPanel Footer Information
- Filters in rtPanel
- Integrated SEO plugin in rtPanel
- Create Metabox on rtPanel Child Theme
- Add Google Adsense Link Unit In Header
- Create Custom Taxonomy on rtPanel
- rtPanel:Comments with Gravatar
- rtPanel: Subscribe Widget
- Create Custom Post Type with rtPanel Child Theme
- rtPanel Theme Options ‘General’
- Using rtp_generate_thumbs() function in child theme
- WordPress Debugger 'WP_DEBUG'
- Adding Social Sharing Button to Website: Using Text Widget
- Clickable header in rtPanel child theme
- CSS Checklist for developers
- Implementing rtp-slider in the child theme
- Creating custom page templates in rtPanel child theme
- Child Theme development using rtPanel – Part I
- Child Theme development using rtPanel – Part 2
- rtPanel Developer Program: Standards Guidelines
- rtPanel Developer Program:Test Project
- Removing the default rtPanel Hooks
- Browser Specific Styling