Advertisement
Guest User

Untitled

a guest
May 12th, 2024
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. <?php
  2. if (!defined('ABSPATH')) {
  3. die();
  4. }
  5.  
  6. global $avia_config, $more;
  7.  
  8. /*
  9. * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
  10. */
  11. get_header();
  12.  
  13. $description = is_tag() ? tag_description() : category_description();
  14. $author_id = get_query_var('author');
  15.  
  16. /**
  17. * Filter author data
  18. *
  19. * @param string
  20. * @param int $author_id
  21. * @param string $context added with 4.7.5.1
  22. * @return string
  23. */
  24. $name = apply_filters('avf_author_name', get_the_author_meta('display_name', $author_id), $author_id, 'author.php');
  25.  
  26. $heading_s = __('Entries by', 'avia_framework') . ' ' . $name;
  27.  
  28. echo avia_title(array('title' => avia_which_archive(), 'subtitle' => $description, 'link' => false));
  29.  
  30. do_action('ava_after_main_title');
  31.  
  32. /**
  33. * @since 5.6.7
  34. * @param string $main_class
  35. * @param string $context file name
  36. * @return string
  37. */
  38. $main_class = apply_filters('avf_custom_main_classes', 'av-main-' . basename(__FILE__, '.php'), basename(__FILE__));
  39.  
  40. ?>
  41.  
  42. <div class='container_wrap container_wrap_first main_color <?php avia_layout_class('main'); ?>'>
  43.  
  44. <div class='container template-blog template-author '>
  45.  
  46. <main class='content <?php avia_layout_class('content'); ?> units <?php echo $main_class; ?>' <?php avia_markup_helper(array('context' => 'content')); ?>>
  47.  
  48. <div class='page-heading-container clearfix'>
  49. <?php
  50.  
  51. get_template_part('includes/loop', 'about-author');
  52.  
  53. ?>
  54. </div>
  55.  
  56. <?php
  57. echo "<h4 class='extra-mini-title widgettitle'>{$heading_s}</h4>";
  58.  
  59. /* Run the loop to output the posts.
  60. * If you want to overload this in a child theme then include a file
  61. * called loop-index.php and that will be used instead.
  62. */
  63. $more = 0;
  64. global $posts;
  65.  
  66. $post_ids = array();
  67. foreach ($posts as $post) {
  68. $post_ids[] = $post->ID;
  69. }
  70.  
  71. if (!empty($post_ids)) {
  72. $atts = array(
  73. 'type' => 'grid',
  74. 'items' => get_option('posts_per_page'),
  75. 'columns' => 3,
  76. 'class' => 'avia-builder-el-no-sibling',
  77. 'paginate' => 'yes',
  78. 'use_main_query_pagination' => 'yes',
  79. 'custom_query' => array(
  80. 'post__in' => $post_ids,
  81. 'post_type' => get_post_types()
  82. )
  83. );
  84.  
  85. /**
  86. * @since 4.5.5
  87. * @return array
  88. */
  89. $atts = apply_filters('avf_post_slider_args', $atts, 'archive');
  90.  
  91. $blog = new avia_post_slider($atts);
  92. $blog->query_entries();
  93.  
  94. echo '<div class="entry-content-wrapper">' . $blog->html() . '</div>';
  95. } else {
  96. get_template_part('includes/loop', 'index');
  97. }
  98. ?>
  99.  
  100. <!--end content-->
  101. </main>
  102.  
  103. <?php
  104.  
  105. //get the sidebar
  106. $avia_config['currently_viewing'] = 'blog';
  107. get_sidebar();
  108.  
  109. ?>
  110.  
  111. </div><!--end container-->
  112.  
  113. </div><!-- close default .container_wrap element -->
  114.  
  115. <?php
  116. get_footer();
  117.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement