Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   New Versions & Updates (http://forum.bytesforall.com/forumdisplay.php?f=54)
-   -   Patch 128-02: Fix issue where thumbnails don't link to post after upgrading to WP 4.7 (http://forum.bytesforall.com/showthread.php?t=23820)

juggledad Dec 9, 2016 01:22 PM

Patch 128-02: Fix issue where thumbnails don't link to post after upgrading to WP 4.7
 
1 Attachment(s)
WordPress 4.7 changed some code causing the link to a post from a thumbnail to stop working. the following patch will fix this issue.

Edit /montezuma/includes/thumb.php and change line 21 from
HTML Code:

        $id = get_the_id() . '_' . $width . '_' . $height . '_' . ( $crop === FALSE ? '0' : '1' );
to
HTML Code:

        $post_id = get_the_id();
        $id = $post_id . '_' . $width . '_' . $height . '_' . ( $crop === FALSE ? '0' : '1' );

and change line 62 from
HTML Code:

                        $this_thumb = '<a href="'.get_permalink( $id ).'">'.$this_thumb.'</a>';       
to
HTML Code:

                        $this_thumb = '<a href="'.get_permalink($post_id).'">'.$this_thumb.'</a>';       
or you can replace the existing montezuma/includes/thumb.php with the attached file (after unzipping it)


All times are GMT -6. The time now is 05:50 PM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.