Tagged: category archive
-
AuthorPosts
-
February 11, 2024 at 12:22 pm #1433984
Hi,
referring to your reply #1433752 my question as a new thread:
How to change the layout of category archives to masonry style?
Your latest suggestions in the thread didn’t work on my side. Login below.Best regards,
VeraFebruary 12, 2024 at 4:23 am #1434045Hey Vera,
Thank you for opening a new thread and sorry for the confusion.
For the portfolio entries, you have to modify the taxonomy-portfolio_entries.php and replace the following code with the modification that we provided in the previous thread.
$grid = new avia_post_grid( array( 'linking' => '', 'columns' => '3', 'contents' => 'title', 'sort' => 'no', 'paginate' => 'yes', 'set_breadcrumb' => false, )); $grid->use_global_query(); echo $grid->html( '' );
Or replace the content of the file with the following code: https://pastebin.com/Arw15X5z
Best regards,
IsmaelFebruary 12, 2024 at 3:48 pm #1434090Hi Ismael,
okay, the look is now “masonry style” but:
1. on the archive page of each category all the projects are shown and not only the ones belonging to this category.
2. the sorting list with the the categories is shown (av-masonry-sort)
3. can I adjust the masonry style to the one I choose under “Projekte”?Best regards,
VeraFebruary 13, 2024 at 7:24 am #1434137Hi,
Thank you for the update.
1.) We added this filter in the functions.php file to adjust the query in the archive pages.
add_filter( 'avia_masonry_entries_query', 'avia_masonry_query_func', 10, 2); function avia_masonry_query_func( $query, $params ) { if ( is_tax() ) { global $wp_query; $term = $wp_query->get_queried_object(); $tax = $term->taxonomy; $query['tax_query'] = array( array( 'taxonomy' => $tax, 'field' => 'id', 'terms' => $term->term_id, 'operator' => 'IN')); } return $query; }
2.) Please look for the “sort” parameter and set its value to “no”
'sort' => 'yes',
3.) You can also adjust the “size” parameter to change the style of the masonry element.
'size' => 'fixed masonry',
Available values are “flex”, “fixed”, “fixed masonry” and “fixed manually”.
Best regards,
IsmaelFebruary 13, 2024 at 4:14 pm #1434184Hi Ismael,
great! A big thank you. That works all fine.
One more question ;-) : at the portfolio grids you have implemented this subtle animation of a little “fading in”. Is this also possible for the masonry grid?
Best regards,
VeraFebruary 17, 2024 at 1:23 pm #1434569Hi,
Thanks for your patience, if you mean the fading in of each item one at a time, this is not an option in the masonry grid and we don’t have an easy way to add this, please choose from the masonry animation options in the element.
Unless there is anything else we can assist with on this issue, shall we close this thread then?Best regards,
MikeFebruary 18, 2024 at 10:50 am #1434636Hi Mike,
thanks for the information.
You can close this thread.Best regards,
Vera -
AuthorPosts
- The topic ‘Change layout of category archive to masonry style’ is closed to new replies.