Tagged: color section, enfold, sidebar
-
AuthorPosts
-
August 25, 2015 at 5:46 pm #493121
The latest version of PrintFriendly works well with Enfold except when using a color section. I’ve seen both forum posts (printfriendly and color section) where the sidebar is displayed beneath content. I’ve seen the workaround by fooling the layout and building an extra column for sidebars content display.
Perhaps a different approach might be to disable the plugin on pages using color section (which in our case is only a handful of pages).
My current Printfriendly settings add code to the template to recognize the printfriendly shortcode. Even though I’m not using the shortcode on the color section page, it causes the sidebar to display at the bottom. If I deactivate the plugin, the color section page displays properly. (See both examples below).
How might I exclude printfriendly template code for individual pages. See exclude code here / printfriendly documentation:
http://support.printfriendly.com/customer/portal/articles/526027-include-or-exclude-content-August 26, 2015 at 11:24 am #493437Hi Julie!
Thank you for using Enfold.
It’s possible to create a new shortcode for the plugin. Refer to this link: https://wordpress.org/support/topic/plugin-print-friendly-and-pdf-button-shortcode
You can then disable the plugin on all pages then use the shortcode only for pages where you want the button to display. Add the shortcode in a code or text block. For more info, please contact the plugin author.
Cheers!
IsmaelAugust 26, 2015 at 3:16 pm #493578Hi Ismael,
That did not work for me. To my child theme’s function.php i added the code you gave me (see below). I get blank output (not even the exposed shortcode). I entered [pf_button] in a text tab of the wysiwyg (link below). The plugin is deactivated. The settings are still set to “add code to the template” prior to deactivation. What am I misssing?Thanks for your response.
j
functions.php CODE – Lines 2-10 are those that apply.<?php /** * Shortcode for printfriendly buttons */ add_shortcode('pf_button', 'get_printfriendly_button'); function get_printfriendly_button() { if( function_exists('pf_show_link') ){ return pf_show_link(); } } /** * Declare custom post types so that the advanced builder recognizes them. */ add_filter('avf_title_args', 'fix_single_post_title', 10, 2); function fix_single_post_title($args,$id) { if ( is_singular(array('post', 'dev-daily', 'dev-military', 'dev-women', 'fic', 'ece-dev', 'worship-help', 'bible3'))) { $args['title'] = get_the_title($id); $args['link'] = get_permalink($id); $args['heading'] = 'h1'; } if( is_singular('faq') ){ $args['title'] = "Topical Q&A"; } return $args; } /** * Declare custom post types so that the advanced builder recognizes them. */ add_filter('avf_builder_boxes', 'add_builder_to_posttype'); //allows cpt dev-daily to use builder function add_builder_to_posttype($metabox) { foreach($metabox as &$meta) { if($meta['id'] == 'avia_builder' || $meta['id'] == 'layout') { $meta['page'][] = 'dev-daily'; /*your custom post type name here*/ $meta['page'][] = 'dev-military'; /*your custom post type name here*/ $meta['page'][] = 'dev-women'; /*your custom post type name here*/ $meta['page'][] = 'fic'; /*your custom post type name here*/ $meta['page'][] = 'bible3'; /*your custom post type name here*/ $meta['page'][] = 'ece-dev'; /*your custom post type name here*/ $meta['page'][] = 'worship-help'; /*your custom post type name here*/ } } return $metabox; } /** * Declare custom post types so that widgets recognizes the view. */ add_action('after_setup_theme','avia_load_additional_widget'); //adds latest news widget for cpt function avia_load_additional_widget() { if (!class_exists('avia_customcptbox')) { class avia_customcptbox extends avia_newsbox { function avia_customcptbox() { $this->avia_term = 'dev-term'; $this->avia_post_type = 'dev-daily'; $this->avia_new_query = ''; //set a custom query here $widget_ops = array('classname' => 'newsbox', 'description' => 'A Sidebar widget to display latest cpt entries in your sidebar' ); $this->WP_Widget( 'customcptbox', THEMENAME.' Latest Devotion', $widget_ops ); } } register_widget( 'avia_customcptbox' ); } } /** * function to return an undo unsbscribe string for MailPoet newsletters * you could place it in the functions.php of your theme * @return string */ function mpoet_get_undo_unsubscribe(){ if(class_exists('WYSIJA') && !empty($_REQUEST['wysija-key'])){ $undo_paramsurl = array( 'wysija-page'=>1, 'controller'=>'confirm', 'action'=>'undounsubscribe', 'wysija-key'=>$_REQUEST['wysija-key'] ); $model_config = WYSIJA::get('config','model'); $link_undo_unsubscribe = WYSIJA::get_permalink($model_config->getValue('confirmation_page'),$undo_paramsurl); $undo_unsubscribe = str_replace( array('[link]','[/link]'), array('<a href="'.$link_undo_unsubscribe.'">','</a>'), '<p><b>'.__('You made a mistake? [link]Undo unsubscribe[/link].',WYSIJA)).'</b><p>'; return $undo_unsubscribe; } return ''; } add_shortcode('mailpoet_undo_unsubscribe', 'mpoet_get_undo_unsubscribe'); ?>
August 27, 2015 at 12:27 pm #494058Hey!
you really need to ask plugin’s author how to exclude the plugin for certain pages.
Cheers!
AndyAugust 27, 2015 at 1:57 pm #494156Hey!
I did ask the plugin author. And since the issue appears only on color section pages, they pointed me to the theme author. How might we resolve the color section issue for this plugin?
Support needed for my 8 Enfold sites please.
Thanks!
j- This reply was modified 9 years, 1 month ago by welswebmaster. Reason: typo
August 28, 2015 at 11:11 am #494755Hi!
The plugin needs to be activated before you can use the shortcode. By “disable”, I mean turn off the button for all pages. Is there any settings where you can disable it for all pages?
Cheers!
IsmaelAugust 28, 2015 at 2:06 pm #494837Ismael – Thanks for your patience and willingness to work this out with me.
Activated. The shortcode you supplied works (see Test page, post and advanced builder examples below ) but – the page with the color section page (see below) still pushes the sidebar content to the bottom . They don’t have a setting for NONE (see config image below)- the radio buttons cause it to default to the template setting. (See settings below.)
August 29, 2015 at 10:34 am #495271Hi!
I visited the Appearance > Editor panel and I noticed that you have a modified version of the template-builder.php and the helper-main-menu.php file. Please try to disable those files temporarily by renaming them then check the page again. http://wels.staging.wpengine.com/test/ (hosted on WPengine)
Cheers!
IsmaelSeptember 9, 2015 at 10:15 pm #500746Hey Ismael,
I’ve renamed both files to “xtemplate-builder.php and xhelper-main-menu.php” and it made no difference (even after cache emptied). The UberMenu is of course messed up with those changes, but the ColorSection page as you can see STILL places the sidebar at the bottom.
Test pages still exist as specified above.September 11, 2015 at 6:10 am #501414Hey!
I’m running out of ideas here. We set the print button to show on taxonomy pages only but it still affects the pages with color section. Please try to contact the plugin author for more info. Ask them if the plugin creates any container even on excluded post types.
Cheers!
IsmaelSeptember 11, 2015 at 4:36 pm #501777Thanks, Ismael
I’ve submitted your question to the PrintFriendly support system. Once I get a response, I’ll post it here. You’re a patient man ;-)September 12, 2015 at 3:39 am #501927Hi!
Is it OK if we deactivate all plugins while checking the site? Maybe the print plugin plus another plugin is causing the issue. You can also test other plugins:
https://wordpress.org/plugins/print-o-matic/
https://wordpress.org/plugins/pdf-print/Best regards,
IsmaelSeptember 12, 2015 at 3:41 pm #502124YES, you may deactivate plugins on the site – its just a copy of production.
The other plugins don’t offer the PDF/Print edit mode prior to outputting. We really like the printfriendly plugin process for that reason.- This reply was modified 9 years, 1 month ago by welswebmaster. Reason: Remove our staging site in public view
September 12, 2015 at 4:17 pm #502134<i>For future reference – FYI:</i>
- Print-o-matic has totally ugly print output and no PDF option. While CSS is available its / element / page unless you purchase the Pro version. Take a look at example 1 below.
- PDF-print doesn’t work at all with the Enfold theme. See example 2 below. The PDF creation button displays code rather than a PDF view output. I tried it with FF, Chrome and Safari.
I’m not seeing other “popular” nor “maintained” plugin options.
September 14, 2015 at 6:25 am #502487Hi!
The plugin wraps the first section inside a container called “pf-content” even on excluded pages. Maybe, you can ask the plugin developer to prevent that from happening.
Best regards,
IsmaelSeptember 15, 2015 at 7:36 pm #503627GREAT news! I asked the PrintFriendly plugin author your question… and he had a solution. So simple too! Here it is…
SEP 15, 2015 | 12:47AM PDT
Taylor Norrish replied:
Ah! Think we have a way to solve this issue.– Go to your WP Admin > Settings > PrintFriendly & PDF
– Under Webmaster Settings > My Page Content Selected
– Select “Content Algorithm”—
Thanks to you Ismael and the Taylor (PrintFriendly) you have resolved the issue! Color section pages and any other type of page (custom post types included) work well with the PrintFriendly plugin. PDF and Print all in one. Thank YOU so very much for your awesome-ness!September 15, 2015 at 7:45 pm #503635FINAL SETTINGS USED FOR SUCCESSFUL PRINT-FRIENDLY PLUGIN & ENFOLD USAGE:
YourSite.com/wp-admin/options-general.php?page=printfriendly
Note: While these are the settings that worked for us – you may need to modify settings to work correctly with your Enfold configuration.Any icon, text size or color
Any button position
Display button on: Add direct to template
Manually place[printfriendly]
shortcode on page, post or custom post type, category page, or taxonomy page, archive you’d like.
Page header: My Website icon
Click to delete: Allow
Images: Include
Image style: Align Right
Email: Allow
PDF: Allow
Print: Allow
Custom css url: (blank)
Webmaster settings
Web site Protocol: http(common)
Password Protected Content: No
Use JavaScript: Yes
Track in Google Analytics: No
My Page Content Selected By: Content AlgorithmSeptember 16, 2015 at 9:36 am #503872Hi!
Glad you found a solution! Thanks for sharing the final settings. :)
Best regards,
IsmaelOctober 19, 2015 at 5:04 pm #521050Absolutely brilliant… been looking for an answer to this for days. Thanks for resolving :-)
October 20, 2015 at 4:32 am #521330 -
AuthorPosts
- You must be logged in to reply to this topic.