Tagged: enfold, pagination, portfolio grid
-
AuthorPosts
-
August 23, 2023 at 12:04 pm #1416945
I have a strange problem. I installed Search&Filter to allow the filtering of a portfolio grid based not only on portfolio categories but on post title and an ACF custom field.
At the beginning (months ago) I had a series of portfolio items belonging to one single category and everything was working smoothly. I now have published other portfolio items belonging to a new category. The filter form works fine, but the avia pagination doesn’t: it redirects always to the first page.
The strange thing is that I have a copy of the site in my local MAMP with just few new portfolio items (the copy was made at the beginning of the preparation of the new portfolio items, made a month ago) that on the other hand works. So it is not a matter of the plugin and the settings. But somehow something is in conflict. I also tried to de-activate the cache plugin but it seems that nothing changes.Do you have any idea of what can happened? In the private section I am adding the link to the portfolio grid page
August 24, 2023 at 5:29 am #1417013Hi Elena,
Can you setup a staging site for us?
Also, please tell us the steps required to reproduce the issues.Best regards,
NikkoAugust 24, 2023 at 9:09 am #1417031Thanks, I need some time to setup a staging site for you, though I doubt this can be of help since, as I explained, the site on my local MAMP is working fine. So there must be some conflict on my live site that I cannot detect.
What I can suggest you is to work on a test page that I used with a duplicate of the filter. I am going to give you details and access in the private section.
Please check out the test filter in the S&F section, and then check out the test page. Following S&F explanation (https://searchandfilter.com/documentation/search-results/custom/) I used the following shortcode:
[searchandfilter id=”123456″ action=”filter_next_query”]August 24, 2023 at 9:17 am #1417032I would like to add also another problem that I found with this website: several times after posting new portfolio pages I realize that in front-end the text contains the entire avia shortcode. I have to open the page and just press enter with the keyboard on the last letter of the text block that the issue disappears, but still the issue is quite annoying. Is it a problem of memory?
August 24, 2023 at 1:39 pm #1417051Hi elenapoliti,
What was the version of Enfold that the Search & Filter plugin was working?
Best regards,
NikkoAugust 24, 2023 at 1:42 pm #1417053On MAMP I have Enfold version 5.6.2 and the last version of S&F plugin. The same was online. Yesterday I tried to update the Enfold online with the last version but the problem still exists. I am sure that there’s something that gets in conflict with the pagination links. I also tried to disable the WP_Optimize cache and / or iThemes. But nothing worked
August 24, 2023 at 4:20 pm #1417073Hi nikko had you have the opportunity of checking the issue with the access and page I sent to you this morning? Thanks
August 28, 2023 at 9:21 am #1417305Hello??? It’s 4 days I don’t have a feedback. Please can you help me go through the problem? Thanks
August 29, 2023 at 12:04 pm #1417420Hi elenapoliti,
I apologize for the delayed response.
The issue seems a bit tricky, the pagination that comes with portfolio grid does not work in this case because the Post Number is set to All instead of putting a certain number.
I’m not really sure how it works with our page builder but please try to use Infinite Scroll instead of pagination: https://searchandfilter.com/documentation/search-results/infinite-scroll/Best regards,
NikkoAugust 29, 2023 at 12:57 pm #1417426Hi Nikko, I just did it and it doesn’t work. Unless I use as Infinite Scroll Container the wrong destination (I inserted #isra-filter-portfolio, which is the ID I gave to the portfolio grid in the LAyout Builder).
Please check the test page I created (details are in the private section of some days ago).
Also I tried to use infinite scroll with Post/Result selector = .grid-entry, and again it doesn’t work.
Any ideas?August 30, 2023 at 10:37 am #1417522Hi elenapoliti,
I tried to test the Search & Filter Pro plugin however I can’t seem to make it work with
[searchandfilter id="123456" action="filter_next_query"]
There’s a avia_post_grid_query filter in Portfolio Grid where you can filter in the query, and I tried to modify it according to the instructions however it doesn’t work.
The only one that actually worked for me is[searchandfilter id="123"] [searchandfilter id="123" show="results"]
But it will need some modifications with CSS to make it look like portfolio grid, which I think is the easier approach.
I also tested infinite scroll but could not get it to work even with a WordPress Default theme.Best regards,
NikkoAugust 30, 2023 at 1:55 pm #1417569Thanks Nikko, that’s a bummer! I really wanted to avoid a CSS approach again…. I know that with show=results” it works, but I cannot use the Portfolio Grid which was definitely easier.
The show=results renders portfolio items in one column. Do you have any suggestion how can I render the items in 2 columns as I set the portfolio grid? Also the rendering has the link to the item in the title only and not on the image.
Then I can play with CSS to make it looking in the same way.Thanks
- This reply was modified 1 year, 3 months ago by elenapoliti.
September 1, 2023 at 12:40 pm #1417805Hi elenapoliti,
I have created a new test page based on the link you gave (link in private content), I also duplicated the search filter and pointed it to the new page.
I added this CSS Code to adjust the style (in Enfold > General Styling > Quick CSS):#top #search-filter-results-4746 hr, #top #search-filter-results-4746 > div:not(.pagination) p { display: none; } #top #search-filter-results-4746 > div:not(.pagination) { width: 50%; float: left; box-sizing: border-box; background-color: white; border: 0.5px solid #ececec; display: flex; flex-direction: column-reverse; min-height: 470px; } #top #search-filter-results-4746 > div:not(.pagination) h2 { background-color: black; color: white; font-family: 'neutratext-book', Helvetica, Arial, sans-serif!important; font-size: 18px !important; margin: 0; padding: 20px; text-transform: none; min-height: 80px; } #top #search-filter-results-4746 div:not(.pagination) p:has(img) { display: block; } #top #search-filter-results-4746 > hr:nth-last-child(3) { display: block; margin-bottom: 20px; } #top #search-filter-results-4746 > .pagination { padding-bottom: 20px; display: flex; flex-direction: row; justify-content: space-between; } #top #search-filter-results-4746 > .pagination a { float: none; width: auto; padding: 0 20px; font-size: 14px; }
Let us know if this works.
Best regards,
NikkoSeptember 1, 2023 at 12:44 pm #1417806Thanks Nikko, I saw you were working on the new testing page. Now it seems working!! I have just to adjust the columns to adapt as 100% when in mobile view and the images are missing, but the system seem finally to work
September 1, 2023 at 2:12 pm #1417824The only things I see that has a problem is the following rule
#top #search-filter-results-4746 div:not(.pagination) p:has(img) {
display: block;
}which is not applied. I tried to add !important but still doesn’t work
September 1, 2023 at 2:31 pm #1417827Hi elenapoliti,
I have checked it and the code is working properly but it will only work on that filter and not on others, we can change it to target different filters or make it generic to target all filters.
If you’re referring to the same filter, then can you post a screenshot for the remaining issues? since I can’t seem to see the issue on my end.
You can upload the screenshots in Savvyify, Imgur, Dropbox or other online image sharing websites, then post the link here (or in private content).Best regards,
NikkoSeptember 1, 2023 at 2:40 pm #1417828Yes I know. I was checking the test page you created that worked with your CSS code
Here’s the link of it appears to me
https://www.dropbox.com/scl/fi/7cvr7bjr9f3pxf2jn15np/Screenshot-2023-09-01-at-14.33.12.png?rlkey=r60ohtz0slwknfaw06j1n2fuc&dl=0
and this is the image of the inspector windowAs you see the 3 <p> are all invisible as they are ruled by this
#top #search-filter-results-4746 hr,
#top #search-filter-results-4746 > div:not(.pagination) p {
display: none;
}But the second <p> whch has the image should be visible, while is not. I was trying to use the :nth-child (2) selector but again it doesn’t work
- This reply was modified 1 year, 3 months ago by elenapoliti.
September 2, 2023 at 10:12 am #1417866Hi elenapoliti,
I see :has does not have support for firefox, you can check it here: https://caniuse.com/?search=%3Ahas
I have added a javascript code to your functions.php to add a class on paragraphs that has images:function has_image(){ ?> <script> (function() { var container = document.querySelector('#top .search-filter-results'); if (container) { var paragraphs = container.querySelectorAll('p'); for (var i = 0; i < paragraphs.length; i++) { var paragraph = paragraphs[i]; if (paragraph.querySelector('img')) { paragraph.classList.add('has-image'); } } } })(); </script> <?php } add_action('wp_footer', 'has_image');
and added this CSS code:
#top #search-filter-results-4746 > div:not(.pagination) p.has-image { display: block; }
Please review the page.
Best regards,
NikkoSeptember 3, 2023 at 11:54 am #1417943Thanks very much Nikko: now it works smoothly!! You can close the ticket
September 3, 2023 at 2:16 pm #1417947Hi elenapoliti,
We’re glad that we could help you :)
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘Pagination in portfolio grids not working with plugin Search&Filter’ is closed to new replies.