Tagged: post grid
-
AuthorPosts
-
April 19, 2023 at 1:36 am #1404875
Hello, i recenlty updated to PHP versin 8 and the grid layout of posts on my home page is no longer working.
I made a copy of the home page and played around with it and found that it works in list mode, just not grid mode which is what i need. It just loads continuously without end.
The settings are set to display ntries from a custom taxonomy and show only title, excerpt and read more link.
also, if i revert back to php 7.4 it works, but that is causing problems with other plugins hence the update.
April 19, 2023 at 4:19 am #1404884Hi w_archer,
I tried to use Blog Posts using Grid Layout (and it’s using PHP version 8) however I can’t seem to replicate the issue you mentioned.
Can you set a staging site for us? so we can try to inspect it.
Also, please try to temporarily turn off all plugins and see if this is caused by some plugin conflict.Best regards,
NikkoApril 19, 2023 at 6:14 am #1404897Hey,
I have made a copy of the website, login below. I have tried disabling other plugins etc but couldn’t get it working.
April 20, 2023 at 7:08 pm #1405073Hi,
Thank you for your patience, I see that your site is using Enfold v4.8.1, this is not PHP v8 compatible, please update your site to Enfold v5.5
To update your version of Enfold you will need to download the latest installable WP version from your Theme Forest account and upload it to your WordPress ▸ Appearance ▸ Themes ▸ Add Themes ▸ Add New
after you choose the zip file and click install, you will see a This theme is already installed message because you are updating, you can continue
then you will see the Theme updated successfully message.
Best regards,
MikeApril 21, 2023 at 2:39 am #1405116Thanks Mike,
Unfortunately that was the first thing i tried, i reverted back to 4.8 when things started breaking. Apologies i forgot to update it again.
I have updated again to 5.5 but the problem persists.
April 21, 2023 at 5:42 pm #1405188Hi,
Thanks for the login, I see that you are using PHP v8.0.28 and Enfold v5.5 now and your homepage loads but not the page you pasted above /new-home/
I see that your child theme has many custom files which probably need to be updated as the core files have most likely changed.
I recommend testing by activating the parent theme and see if this solves. If not also try disabling your plugins. If that resolves the issue, reactivate each one individually until you find the cause.Best regards,
MikeApril 24, 2023 at 7:08 am #1405336hey, thanks for the tip. I started looking into it and found that the problem is with the postslider.php file in my child theme.
unfortunaltely this was a file that was customised with help from your support team a couple years ago. I have no idea whats what. It seems quite different from the new theme file and i cant really tell what part of the update and what was customisation.
i have made a copy of the file and uploaded it where you can find it, link below
April 24, 2023 at 12:13 pm #1405362Hi,
Glad to hear that you have this sorted out, what was the customization meant to do? Are you sure that it is still needed?Best regards,
MikeApril 24, 2023 at 1:54 pm #1405378or post the code ( inside a code tag here ) of the edited old file – and we will see what was the reason for a child-theme file.
April 25, 2023 at 4:16 am #1405465hello, i think the custom code was for displaying custom fields on the post grid. i have pasted hte whole file below but you can find a copy of it on the link i sent above.
thanks for your help
April 25, 2023 at 12:38 pm #1405504Hi,
Thanks for posting your code, but I didn’t find anything in it for custom fields, please link to the thread where you found the customization.// https://pastebin.com/7Kn8R4ZR
Best regards,
MikeApril 25, 2023 at 8:39 pm #1405591it is hard to inspect because some signs ( f.e. empty single quotation marks are transfered to one double quotation mark line 670, 671
since line 820 there seems to be new entries for prize:
$cat_walk = "; $cat_class = 'stray'; foreach($cats as $terms) { foreach($terms as $term) { if(in_array($term->name, array("price", "Price", "catty"))) { $cat_class = "pets"; } $cat_walk .= "term_id) . "'>" . $term->name . ""; } } $cat_walk = "; $meta_out .= '<span class="blog-categories minor-meta">'; $meta_out .= $cat_walk; $meta_out .= '</span>'; } } $stock_availability = get_post_meta( $the_id , 'a_stock_availability', true); if ( ! empty ( $stock_availability ) ) { echo $stock_availability; // also tried return instead of echo $meta_out .= $stock_availability; $output .= $stock_availability; }; …
and from 911:
$output .= $meta_out; $stock_availability = get_post_meta($the_id , 'a_stock_availability', true); if ( ! empty ( $stock_availability ) ) { $output .= "<div class='slide-meta-availability'> ". $stock_availability ."</div>"; }
April 26, 2023 at 12:56 am #1405623Good morning,
Thanks for that. That bit you pasted above made me realise that there is code in there that used to be commented out, but it snow part of the live code. I think it was something copied from the internet that was supposed to be temporary. A few weeks ago the website crashed and i had to revert to an old website backup, im guessing tis file was part of the backup.
In any case im confident that i can figure it out from here.
thanks for your help, much appreciated.
April 26, 2023 at 6:25 am #1405647 -
AuthorPosts
- The topic ‘Post Grid not working’ is closed to new replies.