1. Home
  2. Docs
  3. Responsive Posts Carousel
  4. Developers
  5. rpc_display_meta_data

rpc_display_meta_data

It’s a filter hook, responsible for rendering the title and content on the post templates. It has the following arguments respectively.

  1. display => It’s the actual data that will be rendered
  2. post_id => The ID of the current post
  3. key => meta_key provided in the settings
  4. length => Maximum Number of Words provided in the settings
  5. Settings => It’s an array of all the options and values of the current slider.

Example

add_filter( 'rpc_display_meta_data', 'rpc_change_content', 10, 5 );

function rpc_change_content($display, $post_id, $key, $length, $carousel_settings){
	if ($post_id == '45') {
		return 'Contents are hidden';
	}
	return $display;
}