Tagged: 

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #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.

    #1404884

    Hi 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,
    Nikko

    #1404897

    Hey,

    I have made a copy of the website, login below. I have tried disabling other plugins etc but couldn’t get it working.

    #1405073

    Hi,
    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
    WordPress_Appearance_Themes_Add-Themes_Add-New.jpg
    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
    Installing_theme_from_uploaded_file_This_theme_is_already_installed.jpg
    then you will see the Theme updated successfully message.
    Theme_updated_successfully.jpg

    Best regards,
    Mike

    #1405116

    Thanks 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.

    #1405188

    Hi,
    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,
    Mike

    #1405336

    hey, 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

    #1405362

    Hi,
    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,
    Mike

    #1405378

    or 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.

    #1405465

    hello, 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

    #1405504

    Hi,
    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,
    Mike

    #1405591

    it 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>";
    }
    #1405623

    Good 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.

    #1405647

    Hi,

    Great! If you need further assistance, please don’t hesitate to open another thread. We will now close this one.

    Have a nice day!

    Best regards,
    Ismael

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Post Grid not working’ is closed to new replies.