xand79
Forum Replies Created
-
Forum: Plugins
In reply to: [Wishlist for WooCommerce] Translation with WP Multilang and Loco translate?Okay, it’s my error, I made author translation, but Loco Translate had system translation too, which was active. Deleting this system translation resolved problem.
Forum: Plugins
In reply to: [Wishlist for WooCommerce] Do you have Shortcode for this pluginI’m using another block to work inside products loop, which also can be encapsulated into shortcode function. Just added some check to avoid crashing if plugin is inactive:
if (in_array('wt-woocommerce-wishlist/wishlist-webtoffee.php', apply_filters('active_plugins', get_option('active_plugins')))){
$wt_wishlist = new WT_Wishlist_Looppage();
$wt_wishlist->render_webtoffee_wishlist_button();
}So, shortcode for “Add to wishlist” button, which you can place anywhere in a loop of product blocks will be like this:
add_shortcode( 'cus_wishlist_loop_shortcode', 'woo_wishlist_loop_shortcode_func' ); function woo_wishlist_loop_shortcode_func() { if (in_array('wt-woocommerce-wishlist/wishlist-webtoffee.php', apply_filters('active_plugins', get_option('active_plugins')))){ $wt_wishlist = new WT_Wishlist_Looppage(); $wt_wishlist->render_webtoffee_wishlist_button(); } }
I have the same trouble: block of text after first image rolled into “pf-content” div… But I think that “pf” is pop-up of PrintFriendly plugin. Do you have it too?
Forum: Plugins
In reply to: [The Events Calendar] Events not publishing/Page not foundOf course, it’s not a decision, cause if version of plugin will be renewed, all changes will be lost. But if I whant my calendar do working now – not a days-weeks-… later – it’s only one way: modify code. Of course, those who don’t understand basical php will not do it, but if someone do – this is one of the possible ways to try, I think.
Btw, cyclical redirect in this plugin is an old problem (don’t remember for shure, maybe some monthes). I tried to analyse mechanism of redirects in it, but from version to version it becomes more and more difficult. Add this to redirects in .htaccess, wordpress core, some other plugins in your installation – so where is the broblem? Noone can tell you, it’s only your combination of different factors. And if you don’t want to change your links structure or kill some plugins you need – will author change the code only for you? Will he find universal algoritm for everyone? And general question: when? For me it’s critically, of course not for everybody.
Forum: Plugins
In reply to: [The Events Calendar] Events not publishing/Page not foundI have the same problem. In one situation I got a 404, in other – cyclical redirect on page with single event. It depends of permalink structure (and I don’t want to change it!). But in any case there is right way to see event page: call it https://www.yoursite.com/?tribe_events=event_name. Problem wasn’t decided for a long time, and I desided to simply find a part of code where link to single post is generated and change it according to this sample.
For month view it is in /the-events-calendar/views/month/single-event.php line 27 (ver.3.4.1). Here’s link string made with function tribe_event_link. For widget – it’s made with tribe_get_event_link.
Both functions we can find in /the-events-calendar/public/template-tags/link.php and what’s more – tribe_event_link only calls tribe_get_event_link. So, isn’t it a decision to change this function?
And, at last, here’s my simple variant of this function:
function tribe_get_event_link() { $lnk = get_permalink($event); $lnk = explode("/", $lnk); return $lnk[0] . "/" . $lnk[1] . "/" . $lnk[2] . "/?tribe_events=" . $lnk[4]; }
Well, maybe you’ll decide that it’s reverse ingeneering, but what we can do – this variant works!