Skip to content

Instantly share code, notes, and snippets.

@jpen365
Created November 16, 2016 02:56
Show Gist options
  • Save jpen365/cb7af31a6a36a9ab156255a8b6e1472c to your computer and use it in GitHub Desktop.
Save jpen365/cb7af31a6a36a9ab156255a8b6e1472c to your computer and use it in GitHub Desktop.
Define widget output with widget()
<?php
public function widget( $args, $instance ) {
$title = apply_filters( 'widget_title', $instance[ 'title' ] );
$blog_title = get_bloginfo( 'name' );
$tagline = get_bloginfo( 'description' );
echo $args['before_widget'] . $args['before_title'] . $title . $args['after_title']; ?>
<p><strong>Site Name:</strong> <?php echo $blog_title ?></p>
<p><strong>Tagline:</strong> <?php echo $tagline ?></p>
<?php echo $args['after_widget'];
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment