Skip to content

Instantly share code, notes, and snippets.

@johnchandler
Created August 6, 2013 23:04

Revisions

  1. johnchandler created this gist Aug 6, 2013.
    19 changes: 19 additions & 0 deletions pageviews widget
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    // Pageviews Dashboard Widget

    add_action('wp_dashboard_setup', 'count_dashboard_widgets');

    function count_dashboard_widgets() {
    global $wp_meta_boxes;

    wp_add_dashboard_widget('custom_help_widget', 'Build Your Campaign Pageviews', 'custom_dashboard_help');
    }

    function custom_dashboard_help() {
    echo 'Build Your Campaign Page 1: <strong>'. get_field('byc1',26).' views</strong><br />';
    echo 'Build Your Campaign Page 2: <strong>'. get_field('byc2',26).' views</strong><br />';
    echo 'Build Your Campaign Page 3: <strong>'. get_field('byc3',26).' views</strong><br />';
    echo 'Build Your Campaign Page 4: <strong>'. get_field('byc4',26).' views</strong><br />';
    echo 'Final Page With Minimum Booklets: <strong>'. get_field('with_min',26).' views</strong><br />';
    echo 'Final Page Without Minimum Booklets: <strong>'. get_field('without_min',26).' views</strong><br />';

    }