-
Notifications
You must be signed in to change notification settings - Fork 39
Filters in rtPanel
Filters are the special function able to modify the data without altering the core code. For example, changing 'Read More' text on the blog page can be changed using the 'Filters'.
In the rtPanel child theme we have provided 6 filters as follow:
**rtp_header_image_width: **This is used to modify the width of the header image on your site. Click here for the code.
**rtp_header_image_height: **This is used to modify the height of the header image on your site. Click here for the code.
**rtp_nav_menu_depth: **This is used to specify the number of sub-menus/child to show in the primary menu. By default it is set to 4. Click here for the code.
**rtp_default_image_path: **This could be used to specify the path to a default thumbnail image. In case your posts don’t have a thumbnail, this default thumbnail image would show up. Click here for the code.
**rtp_readmore: **This filter is used by rtPanel itself to wrap the read more text in square brackets. This could be used to remove the brackets or modify the read more text/link. Click here for the code.
rtp_add_theme_pages: This hook is mainly for plugin development. This adds an option tab next to General, Post & Comments.
To use the filter you just have to add the respective code in the "function.php" file and add the desire value to the code. For example, if you want to show the child menu of primary menu, then you have add the code as follows:
function custom_rtp_nav_menu_depth( $depth ) {
return 1;
}
add_filter( 'rtp_nav_menu_depth', 'custom_rtp_nav_menu_depth' );
If you have questions about using filters, please feel free to ask them on our support forum.
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