Forums Forums Search & Filter Pro Images not showing after filtering

Viewing 10 posts - 1 through 10 (of 12 total)
  • Anonymous
    #217279

    Hello,

    I got it to show and filter my CPTs using Divi and CPT injector properly, but after I filter the results their image will not work. https://beta.dadlpinvestments.com/news/. Will you please help me figure it out?

    One more thing, is it possible to filter by month and year only? For example, all news from May 2019 instead of having to pick a day.

    Thank you very much!
    Alex

    Trevor
    #217297

    To answer the questions in reverse, to filter by month and year, you would need a custom field on the posts (which could be autofilled using code for new and re-saved posts) with the year and month in.

    As to the images, do you have a lazyload image option, plugin or plugin with it as an option (like jetpack)? If so, try turning that off.

    Anonymous
    #217315

    Hi Trevor,

    Thanks for the quick response.

    1. If I take this route, will I still use the date picker option as it shows the entire calendar or an autogenerated dropdown menu?

    2. I removed the Ajax option and it’s loading normally. My guess is that they have some sort of Lazyload option as you mentioned. But by not using Ajax, everything else loads perfectly — including the layout which sometimes was a little odd. My only issue with this now is that it only loads 5 posts per page. I tried several codes for changing the number of posts shown on the archive but no luck. Any suggestion?

    This is the archive page: https://beta.dadlpinvestments.com/news/

    Many thanks,
    Alex

    Trevor
    #217329

    1. If you want to show Year and Month, they would be a ‘normal’ dropdown select box. How I would do it is to have a calculated field that uses the WordPress save_post() function, placed in your child theme functions.php, to save the data, and it would be in the form of YYYYMM, so this month would be 201907, and you can manually add date month options to the field in our form design to see this number in the database, but display July 2019, for example. That way you can sort them by value and not label. No, a datepicker would not be used.

    2. On the post, if you inspect the results post, is the image hidden with opacity, but you can still see the image name? I can’t see as Ajax is off right now.

    Anonymous
    #217336

    Hi Trevor,

    I figured it out the — still working on it though — the date issue. I created one field for the year and another for the month that auto-populate. Then, I’m using a dropdown as you suggested. Regarding the Ajax situation, I’ll review it later as I’m ok with the results not being ajax.

    Do you have any idea why I can’t see more than 5 posts per page?

    Many thanks,
    Alex

    Trevor
    #217338

    In the form settings, on the General settings tab, what is the post per page setting at?

    Anonymous
    #217340

    Is set to 15. I also tried setting it via PHP and nothing.

    Trevor
    #217347

    Does the page still work if our plugin is deactivated? If so, how many posts then show? If it is still 5, then there is some custom code, probably using pre_get_posts (which runs AFTER our plugin) that is changing the posts per page.

    Anonymous
    #217351

    Yes, it still shows 5 after deactivating the plugin. I don’t recall adding any custom code for it. How can I check or is there a code I can implement to change this?

    Trevor
    #217353

    A good question. The obvious place to look is either plugins (deactivate a few at a time) or a file named functions.php (which will be in your theme or child theme folder).

    At least we know it is not Search & Filter doing that.

Viewing 10 posts - 1 through 10 (of 12 total)