Forum Replies Created
-
AuthorPosts
-
Hi Nikko,
I’ve just created an example here:As you can see, I’ve inserted the same image as “featured image” (at the top) and than as a normal image inside the post.
The caption (“City of Bergen”), appears only under the “normal” image, but not under the featured one.I’d like to show captions under featured images.
Thanks for your help.
Best regards,
Luca
Hi Rikard,
thanks! That was exactly what I needed.Best regards,
Luca
Hi Rikard,
did you see the page I posted?Luca
Hi Rikard,
yes, that’s what I’d like to have.Here is a post from the website, where you can see the sidebar:
Best regards
Luca
Hi,
I found out that the problem was in the way I was calling “the_content()”, inside a custom template. Both plugins I was trying requires that the post content get called just using the template tag “the_content();”.That solved the issue. Hope it can be helpful for other readers.
Thanks anyway for your support.
Have a nice day.
Luca
Hi Victoria,
in the screenshot attached you can see that before the H2, there is a shortcode that doesn’t get renderd ( [toc] ).
It should be a table of contents.Kind regards
Luca
Hi Ismael,
thanks again, it solves the problem, I confused “the_field” with “get_field”…I really appreciate your helpful support.
Best regards
Luca
Hi Ismael,
thanks a lot for your answer! That was the part that I missed, and now I can see and use the custom template I created.I have another question and maybe you can help me also with this.
I created that template to show posts from a custom post type (called “regali”), created with CPT UI.
I’m also using Advanced Custom Fields to add custom fields to that post type, and I’d like to display my custom fields inside the template.I’ve already checked lots of old topics about the use of ACF in Enfold, but I couldn’t find an answer that works for me, so I hope you can help me (I know that this goes a little beyond Enfold support, but I used ACF before but now I’m not able to make it work on Enfold)
So here is the code that I’ve added to my template, called “single-regali.php” (before and after this code there is the “default” code of enfold “single.php”):
<main class='content units <?php avia_layout_class( 'content' ); ?> <?php echo avia_blog_class_string(); ?>' <?php avia_markup_helper(array('context' => 'content','post_type'=>'post'));?>> <?php /* MY CODE ___________________________________________ */ $args = array ( 'post_type' => 'regali', ); $query = new WP_Query( $args); ?> <?php if ( $query->have_posts() ) : while( $query->have_posts() ) : $query->the_post(); ?> <!-- this is just a test --> <p> <?php echo date("Y"); ?> </p> <!-- here is the CPT --> <!-- title --> <h2> <?php get_field("oggetto"); ?> </h2> <!-- description --> <p> <?php get_field("descrizione"); ?> </p> <?php endwhile; endif; wp_reset_postdata(); ?> <!--end content--> </main>
Please notice that I’ve disabled ALB and that I’ve double checked both the names of the CPT and the ACF fields names along with ACF documentation.
Hope to hear from you soon!
Best regards
Luca
- This reply was modified 5 years, 2 months ago by viaggiareverde.
Hi,
No changes yet. I expect that the template shows up in the attributes section of the post editor.
And I’ve tried the same method with a custom template for pages, and it works.
But with the post template, I can’t even see the option where you can select between the default template and custom ones.Thanks for you help
Hi Victoria,
it works perfectly. Thank you!Regards
Luca
December 9, 2018 at 11:43 pm in reply to: How to make a jQuery plugin work in a specific page #1042838Hi Rikard,
now you can close it.thanks again
Regards
Luca
December 9, 2018 at 1:14 am in reply to: How to make a jQuery plugin work in a specific page #1042632Thanks Mike!
There was a “}” missing after “<?php” but i realized it and fixed so now it works perfectly.
Searching the forum I also found that i needed to use “is_single” instead of “is_page” to make this works on a specific post.
Just wrote this for possible future readers.Thanks again for your quick and efficient support.
Best regards
Luca
December 9, 2018 at 12:07 am in reply to: How to make a jQuery plugin work in a specific page #1042613Hi Mike,
I’ve tried to change the code I put in function.php with the one you posted here. So I added all the plugin functions between the script tags. But that broke the website so maybe I didn’t understand exactly what you meant.Right know I still have a custom JS file, where I have all the functions I need, and that file is called (“globally”) by function.php.
Basically I didn’t understand where to put the code you posted, and, if I need to copy all the functions between the script tags (and maybe delete the custom JS file).Thanks for your help!
Regards
Luca
December 8, 2018 at 7:22 pm in reply to: How to make a jQuery plugin work in a specific page #1042525Hi,
thanks for your answer. I’ve read the guide again and i’ve been able to add this plugin to my website, but still not to the specific page.
So I checked the stackoverflow topic, but I didn’t understand how to apply those information on the Enfold theme.So far, I’ve created a “my_custom.js” file where I’ve wrapped my functions between:
(function( $ ) { "use strict"; $(function() { // ADDED PLUGIN FUNCTIONS HERE }); }(jQuery));
as suggested in the guide: https://kriesi.at/documentation/enfold/add-custom-js-or-php-script/
Can you please help me in the next step to make it work only on one specific post.
Thanks for your help!
Regards
Luca
Hi Rikard,
You can close it now.Thanks.
Regards
Luca
Hi Ismael,
I solved with your hint. Thank you!Have a nice day.
Luca
Hi Mike. I always check these things with the cache disable, but i forgot about the cookies!
I’ve re-checked and it actually works.Thanks for your help and have a good day!
Luca
Hi Basil,
this is my website: https://www.viaggiareverde.it/
I’ve also try to deactivate the plugin i’m using for comment subscription (to avoid potential conflicts), but anything changed.Thanks for your help.
Regards
Luca
Hi Mike, thanks for your help. The CSS code works perfectly in my style.css (i’m using a child theme).
I’m actually using another plugin to do the same, but i thought that maybe i had missed a build-in feature; anyway the plugin does its job so it’s ok.
Just a last question about the comment form. I saw that the “cookie consent checkbox” (for name, email, ..) does NOT appear under the comment form when i’m browsing with chrome (both desktop and mobile), whereas it normally appears when i’m browsing with microsoft edge, or the samsung mobile browser. How can i fix that?
regards
Luca
Thanks Jordan
Hi, thanks for the answer. I’ll try that.
Just a question.
Since i’m running a child theme, does the “quick css” (written under the general styling) works?Or the website only runs the style.css under the enfold-child folder ?Regards
Hi Rikard,
I tried with those options but i can get the result i want (the one shown in the photo attached).
Furthermore i’d like to find a solution that can work on the entire website, like custom css.Thanks for your help
Regards
Hi Nikko,
now it works perfectly.Thank you!
Have a nice day
Luca
Hi Rikard,
I’ve updated to 4.3.2, I’ve purge the cache, disabled both the plugin and the enfold caching system, I’ve also unistalled W3 total cache, but I still have the problem.Thanks for your help!
Regards
Luca
Ok I will.
Thanks again Mike, I really appreciate the help you gave me.Have a nice day
Luca.
Hi Mike,
Now everything is working!I saw that the code is both in the Additional CSS and in the style.css file. Should I remove it from the style.css or should I just leave it in both?
Thank you so much for your fast and professional help!
Luca
Hi,
I think we are closer to the solution. This CSS is now working on the entire website but I’ve noticed one thing.All the thumbnails of the magazine element are now squares (120px x 120px). I modified both your CSS codes to make them 150px x 100px but it doensn’t seems to work (even clearing the cache).
So can you please explain me how to do this change? I don’t really understand what’s wrong. -
AuthorPosts