Skip to content

Adding News Templates

Jim Reevior edited this page Aug 14, 2018 · 1 revision

Adding News Templates

When the BU Post Lists is active, page templates can list specific posts based on the options selected in the admin. In Responsive Framework, this feature is supported on the News page template.

Support for this feature can be added to other page templates using the responsive_news_templates filter.

<?php
/**
 * Add post lists support to custom page templates.
 *
 * @param array $news_templates Page templates that support BU Post Lists.
 *
 * @return array Page templates that support BU Post Lists.
 */
function mytheme_responsive_news_templates( $news_templates ) {
	$news_template[] = 'page-templates/custom-template.php';

	return $news_templates;
}
add_filter( 'responsive_news_templates', 'mytheme_responsive_news_templates' );

Welcome to Responsive!

Get started

Configuration

Build child themes

Sass

Javascript

PHP

Shortcodes

Templates

GitHub

Tasks

Contribute to the framework

Code Examples

BU Developer Resources

Clone this wiki locally