Advertisement
Guest User

tam-team.at

a guest
Dec 14th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. * Add your own functions here. You can also copy some of the theme functions into this file.
  5. * Wordpress will use those functions instead of the original functions then.
  6. */
  7.  
  8.  
  9. function custom_shortcode_func() {
  10. ob_start();
  11. echo "<span class='post-meta-infos'>";
  12. echo "<time class='date-container minor-meta updated'>".get_the_time(get_option('date_format'))."</time>";
  13. echo "<span class='text-sep text-sep-date'>/</span>";
  14.  
  15. if ( get_comments_number() != "0" || comments_open() ){
  16.  
  17. echo "<span class='comment-container minor-meta'>";
  18. comments_popup_link( "0 ".__('Comments','avia_framework'),
  19. "1 ".__('Comment' ,'avia_framework'),
  20. "% ".__('Comments','avia_framework'),'comments-link',
  21. "".__('Comments Disabled','avia_framework'));
  22. echo "</span>";
  23. echo "<span class='text-sep text-sep-comment'>/</span>";
  24. }
  25.  
  26. if(!empty($cats))
  27. {
  28. echo '<span class="blog-categories minor-meta">'.__('in','avia_framework')." ";
  29. echo $cats;
  30. echo '</span><span class="text-sep text-sep-cat">/</span>';
  31. }
  32.  
  33. echo '<span class="blog-author minor-meta">'.__('by','avia_framework')." ";
  34. echo '<span class="entry-author-link" '.avia_markup_helper(array('context' => 'author_name','echo'=>false)).'>';
  35. echo '<span class="vcard author"><span class="fn">';
  36. the_author_posts_link();
  37. echo '</span></span>';
  38. echo '</span>';
  39. echo '</span>';
  40. echo '</span>';
  41. $output = ob_get_clean();
  42. return $output;
  43. }
  44. add_shortcode('the_post_meta', 'custom_shortcode_func');
  45.  
  46.  
  47. function custom_shortcode_func2() {
  48. ob_start();
  49. echo the_category( ', ' );
  50. $output = ob_get_clean();
  51. return $output;
  52. }
  53. add_shortcode('the_category', 'custom_shortcode_func2');
  54.  
  55.  
  56. function custom_tags_shortcode() {
  57. ob_start();
  58. the_tags('<strong>'.__('Tags:','avia_framework').'</strong> ');
  59. $output = ob_get_clean();
  60. return $output;
  61. }
  62. add_shortcode('the_post_tags', 'custom_tags_shortcode');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement