Nelio Software
Forum Replies Created
-
Hi!
Unfortunately, I can’t do that, because it might not work properly on some (most?) themes.
Anyway, if you add the following piece of code in your theme’s
functions.php
file, it’ll work as you want:add_filter( 'post_thumbnail_html', 'nelioefi_add_link', 10, 2 ); function nelioefi_add_link( $html, $post_id ) { if ( uses_nelioefi( $post_id ) ) { $link = '<a href="%s">%s</a>'; $html = sprintf( $link, esc_attr( nelioefi_get_thumbnail_src( $post_id ) ), $html ); }//end if return $html; }//end nelioefi_add_link()
I hope this helps!
Now I see. You may want to try the following CSS rules:
Sidebar
.sidebar.s1 img.nelioefi { max-height:80px; }
Grid
.home .main .post-list.group img { max-height: 250px; }
The second rule, however, might require some
@media
queries, but this will depend on you!I hope this helps.
Hi! Could you please further elaborate what your issues are? What’s amiss? What are you trying to fix?
Hi, lordwilling. I’m glad to see you were able to solve the issue all by yourself. At least, almost!
One possible (and easy) solution for preventing the image of appearing twice in your post is using CSS: simply create a new rule that hides one instance of the image (or the other) and you’re ready to go! Sure, there’ll be two images in the HTML code, but only one will be visible.
Forum: Plugins
In reply to: [Nelio Featured Posts] Bug with custom outputThe usual way for customizing the behavior of a plugin with templates is saving those templates in your theme’s folder. Take a look at the Template Structure in WooCommerce. Moreover, note that, if you save your custom templates in the plugin’s folder, they’d also be deleted when the plugin’s updated.
Therefore, I think I’m not going to modify how our plugin behaves. I will, however, add a warning in our plugin description, so that people is aware that templates placed in your theme’s folder might be deleted during theme updates.
Thanks for the discussion!
Forum: Plugins
In reply to: [GTM4WP - A Google Tag Manager (GTM) plugin for WordPress] Filter RequestSure, that’s fine! No pressure ??
Forum: Plugins
In reply to: [GTM4WP - A Google Tag Manager (GTM) plugin for WordPress] Filter RequestOh, I see. Thanks for the answer! Any clue on when it’ll be ready?
Forum: Plugins
In reply to: [Nelio Featured Posts] Bug with custom outputHi, thanks for the suggestion. Indeed, updating the theme means you’ll be loosing your custom templates. Which folder do you propose? In my opinion, the neatest way to solve the issue is you create a child theme, and you place the templates there. In the end, it’s highly likely that the templates you use depend on you currently active theme, isn’t it?
Since we got no answer from OP, but the solution worked in our environment, we’ll close the thread.
Since we got no answer from OP, but the solution worked in our environment, we’ll close the thread.
Hi, Juan! Actually, our plugin does use the width and height your theme defined. This is how our plugin works:
- We hook into a function called
(get_)the_post_thumbnail
. - One of the parameters of this function (which may or may not be initialized) is
$size
. - This size is, as you can imagine, defined by your theme. If the
$size
parameter is set, we use it to set thewidth
andheight
of the featured image (using inline CSS properties). - If
$size
is not set, then we rely on your theme’s CSS files, which, again, may define thewidth
andheight
of your featured images.
Unfortunately, the previous workflow does not always guarantee that you’ll get proper results. That’s why you may need to add custom CSS rules for tweaking the featured images. In those cases, the
img
tag has a new class (nelioefi
) that will ease the definition of specific rules for external featured images:img.nelioefi
.In conclusion, I think you’ll have to add custom CSS rules for setting the appropriate sizes to your featured images.
Best,
The Nelio TeamHi, Juan! Actually, our plugin does use the width and height your theme defined. This is how our plugin works:
- We hook into a function called
(get_)the_post_thumbnail
. - One of the parameters of this function (which may or may not be initialized) is
$size
. - This size is, as you can imagine, defined by your theme. If the
$size
parameter is set, we use it to set thewidth
andheight
of the featured image (using inline CSS properties). - If
$size
is not set, then we rely on your theme’s CSS files, which, again, may define thewidth
andheight
of your featured images.
Unfortunately, the previous workflow does not guarantee that you’ll get proper results. That’s why you may need to add custom CSS rules for tweaking the featured images. In those cases, the
img
tag has a new class (nelioefi
) that will ease the definition of specific rules for external featured images:img.nelioefi
.Hi again! If you want us to tweak your theme, please contact us via e-mail (customers AT neliosoftware DOT com).
Forum: Plugins
In reply to: [Nelio AB Testing] Why do you open links with target="_blank" ?Hi Leonardo. Yes, indeed. In fact, it’s been already implemented and included in version 3.4 which (as I said in my last response) is currently being tested thoroughly by our testing team.
Forum: Plugins
In reply to: [Nelio AB Testing] Why do you open links with target="_blank" ?Hi Leonardo,
Sorry for the delay in our answer. Indeed, we force external goals to be opened in a new tab because we need time to track the click. In short, this is what’s happening:
- The user clicks on a link that matches an external page action.
- The page is opened in a new tab.
- Since the original page (the one containing the link) has not been replaced (for the clicked page is being opened somewhere else), we have plenty of time for sending the tracking information (i.e. “the user has clicked this link”).
What if we don’t open the link in a new tab? Well, then there are only two options:
- We send the tracking information synchronously. If we do so, the user will click on a link and the response will not be immediate: the tracking information will be sent to our server and, once it’s been successfully sent, the browser will be allowed to open the new page.
- We send the tracking information asynchronously. If we do so, it might be the case that the browser opens the new page so fast that we do not have time to send the information, and the fact that a user clicked the conversion link will be lost.
In order to offer a responsive click and ensure the information was being tracked, we decided to open the link in a new tab. Note we implemented this behavior a few months back, when the tracking information was not directly sent to our servers, but to the customer’s (and response times could be substantially higher than the ones offered by Nelio’s backend servers).
Anyway, the new version of our plugin (3.4, which is currently being tested thoroughly by our testing team), includes a setting that will give you back the control: you’ll be able to decide whether you want links to open in a new tab (responsive click) or not (slightly slower responsiveness, but coherent user experience).
I hope this helps you understand why things are the way they are!
Best regards,
- We hook into a function called