salexch
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [Youtube shortcode] shortcode in ajax// Constructor / initialize plugin function Youtube_shortcode() { // Load our shortcode only on the frontend if ( !is_admin() || FALSE !== strpos($_SERVER['SCRIPT_NAME'], 'wp-admin')) { // Is it a mobile phone? $this->detect_mobile(); // Guess once host language (used for Youtube's old embed code = Flash only) $this->get_hl(); // do_shortcode() is registered as a default filter on 'the_content' with a priority of 11. // To make videos appear on post excerpts follow this guide: https://bloggingsquared.com/blogging-tips/make-shortcodes-work-in-all-wordpress-post-excerpts/ add_shortcode('youtube_sc', array($this, 'output_html')); add_action('wp_enqueue_scripts', array($this, 'output_css')); } // Allow the button to appear on any rich text editor (i.e. text editor in a widget) add_action('admin_init', array($this, 'setup_tinymce_button')); }
try this pathch:
in this file
/wp-content/plugins/wpec-related-products/wpec-related-product.phpreplace:
function on_wpec_related(){ global $post;
with:
function mopu_on_wpec_related(){ global $post, $wpsc_query_vars, $wpsc_variations, $wpsc_custom_meta;
replace:
while($related_product->have_posts()) : $related_product->the_post(); ?> <li> <div class="prodbox <?php echo $wp_query->current_post ; ?> product-<?php echo wpsc_the_product_id();?>"> <div class="prodimg"><a href="<?php echo wpsc_the_product_permalink(); ?>"><img src="<?php echo wpsc_the_product_thumbnail(); ?>" alt="" title="" /></a></div> <div class="prodname"><a href="<?php echo wpsc_the_product_permalink(); ?>"><?php echo wpsc_the_product_title(); ?></a> <?php if (wpsc_have_variation_groups()===false) { ?><div class="prodprice"><?php echo wpsc_the_product_price(); ?></div><? }?> </div> </div> </li> <?php endwhile;
with:
while($related_product->have_posts()) : $related_product->the_post(); $wpsc_custom_meta = new wpsc_custom_meta( get_the_ID() ); $wpsc_variations = new wpsc_variations( get_the_ID() ); ?> <li> <div class="prodbox <?php echo $wp_query->current_post ; ?> product-<?php echo wpsc_the_product_id();?>"> <div class="prodimg"> <a href="<?php echo wpsc_the_product_permalink(); ?>"><img src="<?php echo wpsc_the_product_thumbnail(); ?>" alt="" title="" /></a> </div> <div class="prodname"> <a href="<?php echo wpsc_the_product_permalink(); ?>"><?php echo wpsc_the_product_title(); ?></a> <div class="prodprice"> <?php if(wpsc_product_on_special()) { ?> <span class="salestrike"> <?php } echo wpsc_product_normal_price(); ?></span> </div> <?php if(wpsc_product_on_special()) : ?><div class="prodpricesale"><span class="salered">?<?php echo wpsc_the_product_price(); ?></span></div><?php endif; ?> </div> </div> </li> <?php endwhile;
Viewing 2 replies - 1 through 2 (of 2 total)