Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

rtPanel Hooks

Dinesh Jain edited this page Jan 17, 2016 · 5 revisions

Actions

rtp_head

Used to add style/scripts after wp_head hook before closing of head tag.

Example

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' );

rtp_hook_begin_body

Adds content at the beginning of the body tag.

Example

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' );

rtp_hook_begin_main_wrapper

Adds content at the beginning of the #main-wrapper.

Example

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' );

rtp_hook_begin_header

Adds content at the beginning of the header (.rtp-header)

Example

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' );

rtp_hook_end_header

Adds content at the end of the .rtp-header div.

Example

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' );

rtp_hook_before_header

Used to add content before header ( #header ).

Example

rtp_hook_after_header

Used to add content after header ( #header ). By default rtPanel uses this hook to show the nav menu/page list.

Example

    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' );

rtp_hook_before_logo

Adds content before site logo.

Example

function custom_hook_before_logo() { ?>
<p>This is before Logo</p><?php
}
add_action( 'rtp_hook_before_logo', 'custom_hook_before_logo' );

rtp_hook_after_logo

Adds content after site logo.

Example

function custom_hook_after_logo() { ?>
<p>This is after Logo</p><?php
}
add_action( 'rtp_hook_after_logo', 'custom_hook_after_logo' );

rtp_hook_begin_primary_menu

Adds content at the before primary navigation.

Example

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' );

rtp_hook_end_primary_menu

Adds content after primary navigation.

Example

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' );

rtp_hook_before_content_wrapper

Adds content after end of #header-wrapper and before #content-wrapper.

Example

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' );

rtp_hook_begin_content_wrapper

Adds content at the beginning of #content-wrapper.

Example

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' );

rtp_hook_begin_content

Adds content at the beginning of #content.

Example

function custom_hook_begin_content() { ?>
<p>This is the beginning of #content</p><?php
}
add_action( 'rtp_hook_begin_content', 'custom_hook_begin_content' );

rtp_hook_end_content

Adds content at the end of #content.

Example

function custom_hook_end_content() { ?>
<p>This is the end of #content</p><?php
}
add_action( 'rtp_hook_end_content', 'custom_hook_end_content' );

rtp_hook_begin_post

Adds content at the beginning of every .post.

Example

function custom_hook_begin_post() { ?>
<p>This is the beginning of .post</p><?php
}
add_action( 'rtp_hook_begin_post', 'custom_hook_begin_post' );

rtp_hook_end_post

Adds content at the end of every .post.

Example

function custom_hook_end_post() { ?>
<p>This is the end of .post</p><?php
}
add_action( 'rtp_hook_end_post', 'custom_hook_end_post' );

rtp_hook_begin_post_title

Adds content before every post's title.

Example

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' );

rtp_hook_end_post_title

Adds content after every post's title.

Example

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' );

rtp_hook_post_meta_top

Adds content after .post-title. This is mainly used for the post meta.

Example

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' );

rtp_hook_begin_post_meta_top

Adds content before Top Post Meta Box. Depends on the default applied rtp_hook_post_meta_top hook.

Example

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' );

rtp_hook_end_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.

Example

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' );

rtp_hook_begin_post_meta_bottom

Adds content before Bottom Post Meta Box. Depends on the default applied rtp_hook_post_meta_bottom hook.

Example

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' );

rtp_hook_end_post_meta_bottom

Adds content after Bottom Post Meta Box. Depends on the default applied rtp_hook_post_meta_bottom hook.

Example

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' );

rtp_hook_begin_post_content

Adds content to the beginning of post content (.post-content).

Example

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' );

rtp_hook_end_post_content

Adds content to the end of post content (.post-content).

Example

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' );

rtp_hook_comments

This hook holds the comments template section.

rtp_hook_after_comment_author_avatar

This hook adds the content after author gravatar in comment section.

Example

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' );

rtp_hook_single_pagination

This hook holds the pagination of single post template.

rtp_hook_archive_pagination

This hook holds the pagination of all archive templates.

rtp_hook_end_content_wrapper

Adds content at the end of #content-wrapper.

Example

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' );

rtp_hook_after_content_wrapper

Adds content after end of #content-wrapper.

Example

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' );

rtp_hook_sidebar

This hook adds content after the end of #content, also it holds the sidebar.

Example

function custom_rtp_hook_sidebar() { ?>
<p>This content is after #content.</p><?php
}
add_action( 'rtp_hook_sidebar', 'custom_rtp_hook_sidebar' );

rtp_hook_begin_sidebar

Adds content at the beginning of the Sidebar (#sidebar).

Example

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' );

rtp_hook_sidebar_content

This hook adds content in the right sidebar if widgets are not active. It shows static text, instead of showing blank sidebar.

Example

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' );

rtp_hook_end_sidebar

Adds content at the end of the Sidebar (#sidebar).

Example

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' );

rtp_hook_before_footer

Adds content before Footer (#footer).

Example

function custom_hook_before_footer() { ?>
<p>This is the before Footer</p><?php
}
add_action( 'rtp_hook_before_footer', 'custom_hook_before_footer' );

rtp_hook_after_footer

Adds content after Footer (#footer).

Example

function custom_hook_after_footer() { ?>
<p>This is the after Footer</p><?php
}
add_action( 'rtp_hook_after_footer', 'custom_hook_after_footer' );

rtp_hook_begin_footer

Adds content at the beginning of #footer-wrapper.

Example

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' );

rtp_hook_end_footer

Adds content at the end of #footer-wrapper.

Example

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' );

rtp_hook_end_main_wrapper

Adds content to the end of #main-wrapper.

Example

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' );

rtp_hook_end_body

Adds content at the end of body tag.

Example

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' );

Filters

rtp_header_image_width

Modifies the width of the header image under Appearance-> Header. Default is 960.

Example
function custom_rtp_header_image_width( $width ) {
return 900;
}
add_filter( 'rtp_header_image_width', 'custom_rtp_header_image_width' );

rtp_header_image_height

Modifies the height of the header image under Appearance-> Header. Default is 190.

Example

function custom_rtp_header_image_height( $height ) {
return 100;
}
add_filter( 'rtp_header_image_height', 'custom_rtp_header_image_height' );

rtp_search_placeholder

Modify search box placeholder text in search form.

Example

function custom_rtp_search_placeholder() {
    return "Search here";
}
add_filter( 'rtp_search_placeholder', 'custom_rtp_search_placeholder' );

rtp_gravatar_size

Modify author gravatar size on comment list.

Example

function custom_rtp_gravatar_size() {
    return 64;
}
add_filter( 'rtp_gravatar_size', 'custom_rtp_gravatar_size' );

rtp_mobile_nav_support

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.

Example

function custom_rtp_mobile_nav_support() {
    return " rtp-mobile-nav";
}
add_filter( 'rtp_mobile_nav_support', 'custom_rtp_mobile_nav_support' );

rtp_nav_menu_depth

Modifies the depth of the primary nav menu. Default is 4.

Example

function custom_rtp_nav_menu_depth( $depth ) {
return 2;
}
add_filter( 'rtp_nav_menu_depth', 'custom_rtp_nav_menu_depth' );

rtp_default_image_path

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.

Example

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' );

rtp_readmore

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.

Example

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'  );

rtp_image_sibling_count

Modify images sibling count on image attachment page template, default is 10.

Example

function custom_rtp_image_sibling_count() {
    return 20;
}
add_filter( 'rtp_image_sibling_count', 'custom_rtp_image_sibling_count' );

rtp_viewport

Modify viewport setting of meta tag present in the header.

Example

function custom_rtp_viewport() {
    return "width=1024";
}
add_filter( 'rtp_viewport', 'custom_rtp_viewport' );

rtp_content_wrapper_class

Add extra class for the content wrapper.

Example

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' );

rtp_author_placeholder

Modify author placeholder text in comment form.

Example

function custom_rtp_author_placeholder() {
    return "Enter Name here";
}
add_filter( 'rtp_author_placeholder', 'custom_rtp_author_placeholder' );

rtp_email_placeholder

Modify email placeholder text in comment form.

Example

function custom_rtp_email_placeholder() {
    return "Enter Email Here";
}
add_filter( 'rtp_email_placeholder', 'custom_rtp_email_placeholder' );

rtp_url_placeholder

Modify website placeholder text in comment form.

Example

function custom_rtp_url_placeholder() {
    return "Enter Website URL";
}
add_filter( 'rtp_url_placeholder', 'custom_rtp_url_placeholder' );

rtp_comment_placeholder

Modify the comment textarea placeholder text.

Example
function custom_rtp_comment_placeholder() {
    return "Comment here...";
}
add_filter( 'rtp_comment_placeholder', 'custom_rtp_comment_placeholder' );

rtp_set_sidebar_grid_class

Add or modify class for sidebar container.

Example

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' );

rtp_set_content_grid_class

Add or modify class for content area.

Example

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' );

rtp_set_full_width_grid_class

Add or modify full width template grid class.

Example

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' );

rtp_set_footer_widget_grid_class

Add or modify footer widgets class.

Example

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' );

plugin_support

bbPress Plugin

Use following filter to remove bbPress plugin support

Example

function custom_rtp_show_bbpress_support(){
	return false;
}

add_filter( 'rtp_show_bbpress_support', 'custom_rtp_show_bbpress_support' );

=========================

BuddyPress Plugin

Use following filter to remove BuddyPress plugin support

Example

function custom_rtp_show_buddypress_support(){
	return false;
}

add_filter( 'rtp_show_buddypress_support', 'custom_rtp_show_buddypress_support' );

=========================

Contact Form 7 Plugin

Use following filter to remove Contact Form 7 plugin support

Example

function custom_rtp_show_cf7_support(){
	return false;
}

add_filter( 'rtp_show_cf7_support', 'custom_rtp_show_cf7_support' );

=========================

Ninja Forms Plugin

Use following filter to remove Ninja Forms plugin support

Example

function custom_rtp_show_ninjaform_support(){
	return false;
}

add_filter( 'rtp_show_ninjaform_support', 'custom_rtp_show_ninjaform_support' );

=========================

JetPack Plugin

Use following filter to remove JetPack plugin support

Example

function custom_rtp_show_jetpack_support(){
	return false;
}

add_filter( 'rtp_show_jetpack_support', 'custom_rtp_show_jetpack_support' );

=========================

Regenerate Thumbnails Plugin

Use following filter to remove Regenerate Thumbnails plugin support

Example

function custom_rtp_show_regenerate_support(){
	return false;
}

add_filter( 'rtp_show_regenerate_support', 'custom_rtp_show_regenerate_support' );

=========================

rtMedia Plugin

Use following filter to remove rtMedia plugin support

Example

function custom_rtp_show_rtmedia_support(){
	return false;
}

add_filter( 'rtp_show_rtmedia_support', 'custom_rtp_show_rtmedia_support' );

=========================

rtPanel Hooks Editor Plugin

Use following filter to remove rtPanel Hooks Editor plugin support

Example

function custom_rtp_show_rtpanelhooks_support(){
	return false;
}

add_filter( 'rtp_show_rtpanelhooks_support', 'custom_rtp_show_rtpanelhooks_support' );

=========================

rtSocial Plugin

Use following filter to remove rtSocial plugin support

Example

function custom_rtp_show_rtsocial_support(){
	return false;
}

add_filter( 'rtp_show_rtsocial_support', 'custom_rtp_show_rtsocial_support' );

=========================

rtWidgets Plugin

Use following filter to remove rtWidgets plugin support

Example

function custom_rtp_show_rtwidgets_support(){
	return false;
}

add_filter( 'rtp_show_rtwidgets_support', 'custom_rtp_show_rtwidgets_support' );

=========================

Subscribe To Comments Reloaded Plugin

Use following filter to remove Subscribe To Comments Reloaded plugin support

Example

function custom_rtp_show_subscribecomments_support(){
	return false;
}

add_filter( 'rtp_show_subscribecomments_support', 'custom_rtp_show_subscribecomments_support' );

=========================

WooCommerce Plugin

Use following filter to remove WooCommerce plugin support

Example

function custom_rtp_show_woocommerce_support(){
	return false;
}

add_filter( 'rtp_show_woocommerce_support', 'custom_rtp_show_woocommerce_support' );

=========================

WordPress SEO by Yoast Plugin

Use following filter to remove WordPress SEO by Yoast plugin support

Example

function custom_rtp_show_wordpressseo_support(){
	return false;
}

add_filter( 'rtp_show_wordpressseo_support', 'custom_rtp_show_wordpressseo_support' );

=========================

Yet Another Related Posts Plugin (YARPP) Plugin

Use following filter to remove Yet Another Related Posts Plugin (YARPP) plugin support

Example

function custom_rtp_show_yarpp_support(){
	return false;
}

add_filter( 'rtp_show_yarpp_support', 'custom_rtp_show_yarpp_support' );
Clone this wiki locally