Skip to content

Instantly share code, notes, and snippets.

@ozthegreat
ozthegreat / wpna-restrict-rss-feed-auhor.php
Last active August 8, 2017 09:11
Restrict Instant Articles RSS Feed by category
<?php
if ( ! function_exists( 'wpna_restrict_feed_author' ) ) :
/**
* Modifies the main RSS query.
*
* @param WP_Query $query
* @return $query
*/
function wpna_restrict_feed_author( $query ) {
@ozthegreat
ozthegreat / wpna-article-style-filter-author.php
Last active July 25, 2017 09:56
WordPress Facebook Instant Articles - How to apply different styles to posts
<?php
/**
* Changes the Instant Article style for this post based on author.
*
* This is fired within the loop.
*
* @param string $style The default style.
* @return string The new style to apply.
*/
function wpna_author_style( $style ) {