Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block digitalinkwell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View postviewentrymeta.php
<div class="entry-meta">
<?php twentythirteen_entry_meta(); ?>
// adding page views after Meta Information
$post_id = get_the_ID();
$pageviews = get_page_views($post_id);
echo "$pageviews Views.";
// end of views
View getjetpackpostviews.php
// extract JetPack pageviews
// courtesy of Topher:
function get_page_views($post_id) {
if (function_exists('stats_get_csv')) {
$args = array('days'=>-1, 'limit'=>-1, 'post_id'=>$post_id);
$result = stats_get_csv('postviews', $args);
View postviews.php
// function to display number of posts.
function getPostViews($postID){
$count_key = 'post_views_count';
$count = get_post_meta($postID, $count_key, true);
delete_post_meta($postID, $count_key);
add_post_meta($postID, $count_key, '0');
return "0 View";
View dashboard-instruction-widget.php
add_action( 'wp_dashboard_setup', 'register_my_dashboard_widget' );
function register_my_dashboard_widget() {
'My Dashboard Widget',
View hide-author-usernames.php
add_action(‘template_redirect’, ‘bwp_template_redirect’);
function bwp_template_redirect()
if (is_author())
wp_redirect( home_url() ); exit;
View block-ip-address.php
order allow,deny
deny from 456.123.8.9
allow from all
View restrict-wp-login-access.php
<Files wp-login.php>
order deny,allow
Deny from all
# allow access from my IP address
allow from
View restrict-admin-access.php
order deny,allow
allow from
deny from all
View hide-wp-config.php
<files wp-config.php>
order allow,deny
deny from all
You can’t perform that action at this time.