Created
November 27, 2013 20:53
-
-
Save brunoalves/7683005 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
Mais informações em http://bruno.alves.in/criando-url-limpa-para-feed-para-posts-customizados-no-wordpress/