Tagged: portfolio grid, tag archive
-
AuthorPosts
-
August 31, 2018 at 1:10 pm #1004080
HI
I have some questions about the tag archive pages. I have some edited the tag.php so that the portfolio grid is in 4 columns instead of 3, but am seeing some pages are loading into 2 pages like the one shown below, even though there is space for more items on the 1st page. Can you help me fix this? Is it a matter of allowing only a certain number of items to show in the portfolio on a page? I’d like to show 12 on the page.Also is there a way to add some padding or space under the grid?
thanks for your help,
Nancymy tag.php code is:
<?php if ( !defined('ABSPATH') ){ die(); } global $avia_config, $more; /* * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory. */ get_header(); echo avia_title(array('title' => avia_which_archive())); do_action( 'ava_after_main_title' ); ?> <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'> <div class='container template-blog '> <main class='content <?php avia_layout_class( 'content' ); ?> units' <?php avia_markup_helper(array('context' => 'content'));?>> <div class="category-term-description"> <?php echo term_description(); ?> </div> <?php global $wp_query, $posts; $backup_query = $wp_query; $sorted = array('post'=>array()); $post_type_obj = array(); foreach($posts as $post) { $sorted[$post->post_type][] = $post; if(empty($post_type_obj[$post->post_type])) { $post_type_obj[$post->post_type] = get_post_type_object($post->post_type); } } $avia_config['blog_style'] = apply_filters('avf_blog_style', avia_get_option('blog_style','multi-big'), 'tag'); if($avia_config['blog_style'] == 'blog-grid') { $output = ''; $post_ids = array(); foreach($posts as $post) $post_ids[] = $post->ID; if(!empty($post_ids)) { echo "<div class='entry-content-wrapper'>"; foreach($sorted as $key => $post_type) { if(empty($post_type)) continue; if(isset($post_type_obj[$key]->labels->name)) { $label = apply_filters('avf_tag_label_names', $post_type_obj[$key]->labels->name); $output .= "<h3 class='post-title tag-page-post-type-title'>".$label."</h3>"; } else { $output .= "<hr />"; } $atts = array( 'type' => 'grid', 'items' => get_option('posts_per_page'), 'columns' => 4, 'class' => 'avia-builder-el-no-sibling', 'paginate' => 'yes', 'use_main_query_pagination' => 'yes', 'custom_query' => array( 'post__in'=>$post_ids, 'post_type'=> $key ) ); $blog = new avia_post_slider($atts); $blog->query_entries(); $output .= $blog->html(); } echo $output; echo '</div>'; } else { get_template_part( 'includes/loop', 'index' ); } } else { foreach($sorted as $key => $post_type) { if(empty($post_type)) continue; if(isset($post_type_obj[$key]->labels->name)) { $label = apply_filters('avf_tag_label_names', $post_type_obj[$key]->labels->name); echo "<h3 class='post-title tag-page-post-type-title'>".$label."</h3>"; } else { echo "<hr />"; } if($key == 'portfolio') { $args = array_merge( $wp_query->query_vars, array( 'post_type' => $key ) ); query_posts( $args ); $grid = new avia_post_grid(array( 'linking' => '', 'columns' => '4', 'contents' => 'excerpt', 'sort' => 'no', 'paginate' => 'yes', 'set_breadcrumb' => false, )); $grid->use_global_query(); echo $grid->html(); } else { $args = array_merge( $wp_query->query_vars, array( 'post_type' => $key ) ); query_posts( $args ); $more = 0; get_template_part( 'includes/loop', 'index' ); } $wp_query = $backup_query; } } ?> <!--end content--> </main> <?php //get the sidebar $avia_config['currently_viewing'] = 'blog'; get_sidebar(); ?> </div><!--end container--> </div><!-- close default .container_wrap element --> <?php get_footer(); ?>
- This topic was modified 6 years, 2 months ago by Munford.
September 2, 2018 at 8:15 pm #1004694Hey Munford,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( do be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create a admin user and post the login credentials in the “private data” field.Best regards,
BasilisSeptember 3, 2018 at 10:37 am #1004839thanks for taking a look
login is belowSeptember 3, 2018 at 2:47 pm #1004991Hi Munford,
Best regards,
VictoriaSeptember 3, 2018 at 5:16 pm #1005066I don’t know what that is – I found the code in another thread.
I just needed the tabs to show at the bottom of the page, and link to the correct tab categories.
Then I customized the tab archive page to have 4 columns, and I’d like all the items to be shown on the page,
without pagination if possible
thanks for your help
Nancy- This reply was modified 6 years, 2 months ago by Munford.
September 4, 2018 at 9:10 am #1005327Hi,
You can set the number of items per page on the “Reading” settings page (see link private content). I set the number to 100 now to show all items on one page.
Best regards,
DudeSeptember 9, 2018 at 5:48 pm #1007633that is great thanks so much!
you can close this thread/September 10, 2018 at 6:41 am #1007766 -
AuthorPosts
- The topic ‘change portfolio grid on tag archive pages’ is closed to new replies.