nflor
Forum Replies Created
-
Hi @jarnovos
thank you so much for your adaptation, it works as I wanted, amazing 🙂
Thanks again @rogierlankhorst , I do not know if you could add this option in future versions, could be useful to someone 🙂
Have you both a nice day,
nflorthank you so much for your reply. I tried in many ways but I do not manage to get the edited code working. The original code works good, while I would like to apply the function by scrolling.
This is the edited version:
<?php function cmplz_delay_banner() { ob_start(); ?> <script> document.addEventListener("cmplz_before_cookiebanner", function() { document.querySelector('#cmplz-cookiebanner-container').classList.add('cmplz-hidden'); }); document.addEventListener("cmplz_cookie_warning_loaded", function() { setTimeout(function(){ if (document.body.scrollTop > 30) { document.querySelector('#cmplz-cookiebanner-container').classList.remove('cmplz-hidden'); } }, 3000); }); </script> <?php $script = ob_get_clean(); $script = str_replace(array('<script>', '</script>'), '', $script); wp_add_inline_script( 'cmplz-cookiebanner', $script); } add_action( 'wp_enqueue_scripts', 'cmplz_delay_banner', PHP_INT_MAX );
That does not work. How can I fix that? I even tried to remove the original 3000 ms delay but probably due to my bad knowledge of php I don’t manage make it working.
- This reply was modified 2 years, 2 months ago by nflor.
Forum: Plugins
In reply to: [Custom Post Type UI] How to show only primary-level taxonomies to a CPT?Hi @tw2113
yes, you got what I would like to achieve. No problem at all, it would be nice to have such a feature but I understand that it is a particular request 🙂
Have a nice day,
nflorHi @pomegranate
okay I see, thank you very much for your help. I am trying to solve the issue with the plugin’s support.
nflor
Hi @getbrave
sure, I will do!
I have just managed to fix applying this filter:
add_filter( 'body_class', function( $classes ) { if (strpos($_SERVER['HTTP_USER_AGENT'], 'wv') !== false){ return array_merge( $classes, array( 'body--webview' ) ); }else{ return $classes; }});
and then applying CSS 🙂
Thank you so much again for your support, I am closing this thread
nflorHi @getbrave
I examined the code and I get it in source code. If I do the opposite (from !== to ==) I can see it in web browser only, as it should do.
If I test JS in console, it works, adding the class correctly.
I guess that it has something to do with onload… I am trying different ways
Thanks again,
nflorHi @getbrave
thank you so much for your help. I’ve tried to add it through Code Snippets plugin as a script in the head tag, but does not work (applying CSS as well).
I do not know PHP very well, but I found on the Internet another script. I added this in functions.php and combined with your JS:
function add_codeToHead() { if (strpos($_SERVER['HTTP_USER_AGENT'], 'wv') !== false) { $code = "<script> document.getElementsByTagName('body')[0].classList.add('body--webview'); </script>"; echo $code; } } add_action('wp_head', 'add_codeToHead', 1);
Still with same CSS, are there any errors in this PHP script?
Thanks again,
nflorForum: Plugins
In reply to: [Salon booking system] Manual booking email requiredThanks to both of you 🙂
That would be awesome!nflor
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Custom PDF filenameForum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Custom PDF filenameHi @kluver
thank you so much for your help. I am really sorry to be so late in replying, but I had to fix a compatiblity issue using your plugin together with Order Signature for WooCommerce plugin, which supports you officially.
Basically with your code I managed to download correctly the PDF with corrent new filename but I found a bug in email attachments, where the PDF extension disappeared. S a file was enclosed but without extension.
I managed to fix typing%s-%s.pdf
instead of simple%s-%s
in the $new_filename variable.Thanks again,
nflor- This reply was modified 2 years, 11 months ago by nflor.
Hi @bestwebsoft
thank you for your reply. I am currently using Divi with WooCommerce, and the generated PDF which I get is fine. I am not using any other third-party plugin, only retrieving the post title, featured image and text ($content).
I had already followed your guide about PHP code, I only need to know how to set the title first. I went on “output” section, and selected both “Additional elements” on your plugin settings (Title & Featured image). The problem is that your plugins shows the image above the title, while I need the title at first.
I would need something like:
return $title . $featured-image . $content;ONLY If it is easy, can you help me with this?
Forum: Plugins
In reply to: [WooCommerce] How to add custom text after magnifying glass in product page?many thanks for your reply. I will figure out how to do it through JS/CSS then.
Have a nice day,
nflorForum: Plugins
In reply to: [WP Responsive Recent Post Slider/Carousel] How to hide sub-category names?Hi @themehigh
thank you for your help 🙂 I did what you mention but it is going to add the new section simply after (and below) the “add to cart” button, aligned in the right column. You can see the “TABUM-TIT” section which I created here (after “add to cart” button): https://flydemos.com/wepo/product/super-new-demo-product/
I would need it as a full width section, under both the product image and the “add to cart” button. I created a second example of what I mean here: https://imgur.com/x7iQU5C
Thank you again for your patience!
nflor