Title: shortcode for Icy theme
Last modified: August 21, 2016

---

# shortcode for Icy theme

 *  [AWN](https://wordpress.org/support/users/wakilnikzad/)
 * (@wakilnikzad)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/shortcode-for-icy-theme/)
 * Hello dears,
 * I am wondering if anyone help me get this great plugin worked on my [website](http://wakilnikzad.com),
   I want to show counter in the post meta of my theme Icy. Unfortunately this theme
   is a little different. It has a special section for shortcodes. The link below
   is an image of the setting section.
    [http://wakilnikzad.com/wp-content/uploads/2013/07/PostViews.jpg](http://wakilnikzad.com/wp-content/uploads/2013/07/PostViews.jpg)
 * And the following code is in my shortcode.php:
 *     ```
       <?php
       /**
        * Defines shortcodes functions.
        *
        * @author WildWebLab
        * @link   http://wildweblab.com/theme/icy
        */
   
       /**
        * Return Full Copyright.
        *
        * @since 1.0
        */
       function wwl_footer_copyright() {
       	return get_bloginfo('name') . ' © ' . date('Y');
       }
       add_shortcode( 'footer_copyright', 'wwl_footer_copyright' );
   
       /**
        * Link to WordPress.
        *
        * @since 1.0
        */
       function wwl_footer_wordpress_link() {
       	return '<a href="http://wordpress.org/">WordPress</a>';
       }
       add_shortcode( 'footer_wordpress_link', 'wwl_footer_wordpress_link' );
   
       /**
        * Link to WildWebLab.
        *
        * @since 1.0
        */
       function wwl_footer_wildweblab_link() {
       	return '<a href="http://wildweblab.com/">WildWebLab</a>';
       }
       add_shortcode( 'footer_wildweblab_link', 'wwl_footer_wildweblab_link' );
   
       /**
        * Link to Post Autor.
        *
        * @since 1.0
        *
        * @param array $atts Shortcode attributes
        * @return string Shortcode output
        */
       function wwl_post_author( $atts ) {
       	$defaults = array(
       		'before' => '',
       		'after'  => '',
       	);
   
       	$atts = shortcode_atts( $defaults, $atts );
   
       	return sprintf( '%1$s<span class="author vcard"><a class="url fn n" href="%2$s" title="%3$s">%4$s</a></span>%5$s',
       		$atts['before'],
       		get_author_posts_url( get_the_author_meta( 'ID' ) ),
       		sprintf( esc_attr__( 'View all posts by %s', 'icy' ), get_the_author() ),
       		get_the_author(),
       		$atts['after']
       	);
       }
       add_shortcode( 'post_author', 'wwl_post_author' );
   
       /**
        * Post Date.
        *
        * @since 1.0
        *
        * @param array $atts Shortcode attributes
        * @return string Shortcode output
        */
       function wwl_post_date( $atts ) {
       	$defaults = array(
       		'before' => '',
       		'after'  => '',
       	);
   
       	$atts = shortcode_atts( $defaults, $atts );
   
       	return sprintf( '%1$s<span class="entry-date"><a href="%2$s" title="%3$s" rel="bookmark">%4$s</a></span>%5$s',
       		$atts['before'],
       		get_permalink(),
       		esc_attr( get_the_time() ),
       		get_the_date(),
       		$atts['after']
       	);
       }
       add_shortcode( 'post_date', 'wwl_post_date' );
   
       /**
        * Link Edit.
        *
        * @since 1.0
        *
        * @param array $atts Shortcode attributes
        * @return string Shortcode output
        */
       function wwl_post_edit( $atts ) {
       	if( $edit_link = get_edit_post_link() ) {
   
       		$defaults = array(
       			'before' => '· ',
       			'after'  => '',
       		);
       		$atts = shortcode_atts( $defaults, $atts );
   
       		return sprintf( '%1$s<span class="edit-link"><a href="%2$s">%3$s</a></span>%4$s',
       			$atts['before'],
       			$edit_link,
       			__( 'Edit', 'icy' ),
       			$atts['after']
       		);
       	}
       }
       add_shortcode( 'post_edit', 'wwl_post_edit' );
   
       /**
        * Post Tags.
        *
        * @since 1.0
        *
        * @param array $atts Shortcode attributes
        * @return string Shortcode output
        */
       function wwl_post_tags( $atts ) {
       	if( $tags = get_the_tag_list( '', ', ' ) ) {
   
       		$defaults = array(
       			'before' => __( 'Tags: ', 'icy' ),
       			'after'  => '. ',
       		);
       		$atts = shortcode_atts( $defaults, $atts );
   
       		return sprintf( '%1$s<span class="entry-tags">%2$s</span>%3$s',
       			$atts['before'],
       			$tags,
       			$atts['after']
       		);
       	}
       }
       add_shortcode( 'post_tags', 'wwl_post_tags' );
   
       /**
        * Post Categories.
        *
        * @since 1.0
        *
        * @param array $atts Shortcode attributes
        * @return string Shortcode output
        */
       function wwl_post_categories( $atts ) {
       	if( $categories = get_the_category_list( ', ' ) ) {
   
       		$defaults = array(
       			'before' => __( 'Posted in: ', 'icy' ),
       			'after'  => '. ',
       		);
       		$atts = shortcode_atts( $defaults, $atts );
   
       		return sprintf( '%1$s<span class="entry-categories">%2$s</span>%3$s',
       			$atts['before'],
       			$categories,
       			$atts['after']
       		);
       	}
       }
       add_shortcode( 'post_categories', 'wwl_post_categories' );
   
       /**
        * Link to Post Comments.
        *
        * @since 1.0
        *
        * @param array $atts Shortcode attributes
        * @return string Shortcode output
        */
       function wwl_post_comments( $atts ) {
       	if ( comments_open() ) {
       		ob_start();
       		comments_popup_link( __( '0', 'icy' ), __( '1', 'icy' ), __( '%', 'icy' ) );
       		$comments_link = ob_get_clean();
   
       		$defaults = array(
       			'before' => ' · ',
       			'after'  => '',
       		);
       		$atts = shortcode_atts( $defaults, $atts );
   
       		return sprintf( '<span class="comments-link">%1$s</span>',
       			$atts['before'] . $comments_link . $atts['after']
       		);
       	}
       }
       add_shortcode( 'post_comments', 'wwl_post_comments' );
       ```
   
 * Thank you very much!
 * [http://wordpress.org/extend/plugins/wp-postviews/](http://wordpress.org/extend/plugins/wp-postviews/)

The topic ‘shortcode for Icy theme’ is closed to new replies.

 * ![](https://ps.w.org/wp-postviews/assets/icon.svg?rev=978002)
 * [WP-PostViews](https://wordpress.org/plugins/wp-postviews/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-postviews/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-postviews/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-postviews/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-postviews/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-postviews/reviews/)

## Tags

 * [view count](https://wordpress.org/support/topic-tag/view-count/)

 * 0 replies
 * 1 participant
 * Last reply from: [AWN](https://wordpress.org/support/users/wakilnikzad/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/shortcode-for-icy-theme/)
 * Status: not a support question