Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * Add your own functions here. You can also copy some of the theme functions into this file.
- * Wordpress will use those functions instead of the original functions then.
- */
- function custom_shortcode_func() {
- ob_start();
- echo "<span class='post-meta-infos'>";
- echo "<time class='date-container minor-meta updated'>".get_the_time(get_option('date_format'))."</time>";
- echo "<span class='text-sep text-sep-date'>/</span>";
- if ( get_comments_number() != "0" || comments_open() ){
- echo "<span class='comment-container minor-meta'>";
- comments_popup_link( "0 ".__('Comments','avia_framework'),
- "1 ".__('Comment' ,'avia_framework'),
- "% ".__('Comments','avia_framework'),'comments-link',
- "".__('Comments Disabled','avia_framework'));
- echo "</span>";
- echo "<span class='text-sep text-sep-comment'>/</span>";
- }
- if(!empty($cats))
- {
- echo '<span class="blog-categories minor-meta">'.__('in','avia_framework')." ";
- echo $cats;
- echo '</span><span class="text-sep text-sep-cat">/</span>';
- }
- echo '<span class="blog-author minor-meta">'.__('by','avia_framework')." ";
- echo '<span class="entry-author-link" '.avia_markup_helper(array('context' => 'author_name','echo'=>false)).'>';
- echo '<span class="vcard author"><span class="fn">';
- the_author_posts_link();
- echo '</span></span>';
- echo '</span>';
- echo '</span>';
- echo '</span>';
- $output = ob_get_clean();
- return $output;
- }
- add_shortcode('the_post_meta', 'custom_shortcode_func');
- function custom_shortcode_func2() {
- ob_start();
- echo the_category( ', ' );
- $output = ob_get_clean();
- return $output;
- }
- add_shortcode('the_category', 'custom_shortcode_func2');
- function custom_tags_shortcode() {
- ob_start();
- the_tags('<strong>'.__('Tags:','avia_framework').'</strong> ');
- $output = ob_get_clean();
- return $output;
- }
- add_shortcode('the_post_tags', 'custom_tags_shortcode');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement