This file contains 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 | |
if ( ! defined("POST_VIEWS_KEY") ) { | |
define("POST_VIEWS_KEY", "post_views_count"); | |
} | |
// function to display number of posts. | |
function get_post_views( $post_id ){ |
This file contains 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 | |
//Remove CPT's | |
function dk_delete_post_type(){ | |
unregister_post_type( 'beers' ); | |
} | |
add_action('init','dk_delete_post_type'); | |
//Custom Permalinks and Rewrites | |
function wpa_show_permalinks( $post_link, $post ){ | |
if ( is_object( $post ) && $post->post_type == 'event' ){ |
NewerOlder