Peter J. Herrel
Forum Replies Created
-
Forum: Plugins
In reply to: [Pay for Payment for WooCommerce] Problem after update to woocommerce 3.2FYI the suggested fix has been submitted https://github.com/vyskoczilova/woocommerce-payforpayment/pull/23
Forum: Plugins
In reply to: [Payment Gateway Braintree WooCommerce] Typo in order note success message@wpinsider-1 thanks!
NB: the plugin repo and wpackagist are picking up 1.4 (I assume from trunk), but it looks like a 1.4 tag is missing, see https://plugins.svn.wordpress.org/woocommerce-braintree-payment-gateway/tags/.
@leejosepho Should be fixed with version 0.2.1
@leejosepho Thanks for reporting, I’m aware, and recently created a ticket for this on github: https://github.com/diggy/wp-awld-js/issues/1 Hope to be able to address the issue asap!
Forum: Plugins
In reply to: [Confirm Publishing Actions] Show confirmation for Contributors only?@brownsmart drop the following in the
functions.phpfile of your theme, or a custom plugin:add_action( 'admin_enqueue_scripts', 'cpa_dequeue_for_all_but_contrib', 25 ); function cpa_dequeue_for_all_but_contrib() { if( in_array( 'contributor', $GLOBALS['current_user']->roles ) ) return; wp_dequeue_script( 'cpa' ); }Forum: Plugins
In reply to: [WP Bootstrap Carousel] Woocommerce Product Gallery@bounty_digital I tweaked the snippet a little. Using
post__infor theorderbyparam, the carousel will respect the order of the images in the product gallery:add_filter( 'the_content', 'wpbc_woo_the_content', 10, 1 ); function wpbc_woo_the_content( $content ) { if( ! is_singular( 'product' ) ) return $content; global $product; if( $product->get_gallery_attachment_ids() ) { $content = $content . do_shortcode( '[display-posts orderby="post__in" post_type="attachment" id="' . get_post_meta( $product->post->ID, '_product_image_gallery', true ) . '" bootstrap="1" unwrap="1"]' ); } return $content; }About the grey space, sounds like a rather specific issue, but I might be wrong. Are you using a Bootstrap powered theme?
Forum: Plugins
In reply to: [WP Bootstrap Carousel] Woocommerce Product GalleryYou’ll need to install the Display Posts Shortcode plugin: https://wordpress.org/plugins/display-posts-shortcode/
Forum: Plugins
In reply to: [WP Bootstrap Carousel] Woocommerce Product Gallery@bounty_digital, sure, but I’m afraid you’ll have to use the Display Posts Shortcode addon for that. Below is a snippet you could tweak to your liking. The code should go in your functions.php or in a custom plugin, and will append a carousel with product gallery images to the post content:
add_filter( 'the_content', 'wpbc_woo_the_content', 10, 1 ); function wpbc_woo_the_content( $content ) { if( ! is_singular( 'product' ) ) return $content; global $product; $wpbc_attachment_ids = $product->get_gallery_attachment_ids(); if( $wpbc_attachment_ids ) { $wpbc_attachment_ids = implode( ',', $wpbc_attachment_ids ); $content = $content . do_shortcode( '[display-posts post_type="attachment" id="' . $wpbc_attachment_ids . '" bootstrap="1" unwrap="1"]' ); } return $content; }As to your second question, a simple
unwrap="1"should do the trick. However, you might be experiencing a problem similar to this one.Forum: Plugins
In reply to: [WP What Links Here] Can't get it to workAdam,
– sidebar: I did not test, but it should work, provided the
$postglobal is available and not corrupted. Did you give it a try?– posts: not sure why there would be a problem with posts.. The plugin should work out of the box with all public post types. The script scans the post content field for internal links. You’re not using a custom editor by any chance?
– the waiting game: I’d recommend to use the wp-crontrol plugin (see wiki) to test and execute the cron job on demand, until you’re sure everything works as desired.
Forum: Plugins
In reply to: [WP What Links Here] Can't get it to workHello Adam,
thanks for taking interest in this plugin!
– the easiest way would be to simply use the
[wp_what_links_here]shortcode, to be inserted in the post editor
– to use it programmatically, you can throw the first snippet from the wiki in a template likesingle.phporpage.php. The snippet to append the list to the post content with thethe_contentfilter should go in yourfunctions.phpfile, or a custom plugin.
– the list of IDs returned bywp_what_links_here()is something more advanced users could use to thoroughly customize the list of linked postsMaybe you get the impression that it’s not working because the queue is processed every two hours, that is, after installing the plugin AND having saved at least one post containing a link to another post. The wiki contains instructions to decrease the time of the interval, if desired.
Let me know if this helps!
Forum: Plugins
In reply to: [WP Bootstrap Carousel] Caption with additional button@gerital, thanks for sharing. Instead of hacking the plugin, however, I’d recommend using the
wp_bootstrap_carousel_caption_textfilter.If you only need one single button globally, you could do something like:
add_filter( 'wp_bootstrap_carousel_caption_text', 'my_wp_bootstrap_carousel_caption_text', 10, 1 ); function my_wp_bootstrap_carousel_caption_text( $caption ) { return $caption . '<p><a class="register-button" href="http://example.com/">Register</a></p>'; }For more fine-grained control, I’d suggest enabling custom fields for the
attachmentpost type:add_post_type_support( 'attachment', 'custom-fields' );And if not empty, appending the value of the field to the caption as follows:
add_filter( 'wp_bootstrap_carousel_caption_text', 'my_wp_bootstrap_carousel_caption_text', 10, 2 ); function my_wp_bootstrap_carousel_caption_text( $caption, $item_id ) { $post_meta = get_post_meta( $item_id, 'wpbc_btn', true ); if( '' != $post_meta ) $caption .= "<p>{$post_meta}</p>"; return $caption; }Forum: Plugins
In reply to: [Confirm Publishing Actions] Errors after installingHi @sheridanmedia I’m inclined to think the problem you’re experiencing is not related to the plugin, check Google for threads mentioning that specific error message. The plugin is JS based, very simple and non-invasive, I think there’s something else at play. Nevertheless, I’ll run a test on a multisite installation asap, and let you know. It would certainly help if you could share any details on wp version, theme and other plugins you’re using.
Forum: Plugins
In reply to: [WP Bootstrap Carousel] Featured imageMarking this topic as resolved. @paulmyatt if you got more questions, let me know.
Forum: Plugins
In reply to: [WP Bootstrap Carousel] Featured image@paulmyatt, sure, you can filter the default
pairs(the supported attributes and their defaults) with thewp_bootstrap_carousel_shortcode_attsfilter:add_filter( 'wp_bootstrap_carousel_shortcode_atts', 'my_wp_bootstrap_carousel_shortcode_pairs', 10, 1 ); function my_wp_bootstrap_carousel_shortcode_pairs( $pairs ) { $pairs['exclude'] = ''; return $pairs; }This approach still allows you to exclude the thumb manually, if necessary, by using the thumb’s ID with
excludeparam in the shortcode tag.Another and more permanent option would be to filter the
$atts(the user defined attributes in the shortcode tag) that are passed through the dynamicshortcode_atts_{$shortcode}filter:add_filter( 'shortcode_atts_carousel', 'my_wp_bootstrap_carousel_shortcode_atts', 10, 1 ); function my_wp_bootstrap_carousel_shortcode_atts( $atts ) { $atts['exclude'] = ''; return $atts; }Forum: Plugins
In reply to: [Category Pie] Shortcode for inclusion in posts?@yournic, thanks. I can confirm I have been thinking about developing a front-end aspect for this plugin, but as of yet there’s no concrete plan or roadmap π