-
-
Save monecchi/d4cd69e3806a4c1a2183293c8334576b to your computer and use it in GitHub Desktop.
Custom post type feed rewrite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function artigo_feed_rewrite( $wp_rewrite ) { | |
$feed_rules = array( | |
'feed/artigos' => 'index.php?post_type=listing&feed=rss2' | |
); | |
$wp_rewrite->rules = $feed_rules + $wp_rewrite->rules; | |
} | |
// regerar regras de permalinks depois de ativar / implementar esse código | |
add_filter( 'generate_rewrite_rules', 'artigo_feed_rewrite' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment