Fresalina
Forum Replies Created
-
Forum: Plugins
In reply to: [Print This Section] Plugin not working with WP 3.5Awesome! I’m glad it worked for you as well. You’re very welcome.
Forum: Fixing WordPress
In reply to: WordPress Print This Section HelpNo need to rewrite the entire pluggin. It’s minor fix to 3 lines that create all the mess.
The problem is that with the new WordPress update {3.6}, it only generates a “print section” for the first post of each page AND when you go directly to the post’s url. I have 3 post per page. The last two posts of each page used to get the error message.
There is a way to go around this, but you have to edit the code of the plugin yourself. I advise you to save the code prior to changing it in case it does not work for you.
This works like a charm on my site: http://www.fresalina.com/cooking/
Fix it by editing class-wp-print-this-plugin.php.
On line 170, 171, 172, change from this:
$print_this_link = get_permalink( $post->ID ) . '&printthis=1&printsect=' . $print_this_counter; } else { $print_this_link = get_permalink( $post->ID ) . '?printthis=1&printsect=' . $print_this_counter;To this:
$print_this_link = get_permalink( $post->ID ) . '?printthis=1&printsect=1'; } else { $print_this_link = get_permalink( $post->ID ) . '?printthis=1&printsect=1';This new code tells WordPress to print each section individually instead like before telling it to print section 1, 2, 3 with the code ” print_this_counter; “… of each page.
Forum: Plugins
In reply to: [Print This Section] Plugin not working with WP 3.5The problem is that with the new WordPress update {3.6}, it only generates a “print section” for the first post of each page AND when you go directly to the post’s url. I have 3 post per page. The last two posts of each page used to get the error message.
There is a way to go around this, but you have to edit the code of the plugin yourself. I advise you to save the code prior to changing it in case it does not work for you.
This works like a charm on my site: http://www.fresalina.com/cooking/
Fix it by editing class-wp-print-this-plugin.php.
On line 170, 171, 172, change from this:
$print_this_link = get_permalink( $post->ID ) . '&printthis=1&printsect=' . $print_this_counter; } else { $print_this_link = get_permalink( $post->ID ) . '?printthis=1&printsect=' . $print_this_counter;To this:
$print_this_link = get_permalink( $post->ID ) . '?printthis=1&printsect=1'; } else { $print_this_link = get_permalink( $post->ID ) . '?printthis=1&printsect=1';This new code tells WordPress to print each section individually instead like before telling it to print section 1, 2, 3 with the code ” print_this_counter; “… of each page.