Forum Replies Created
-
AuthorPosts
-
Thank you – it’s all working just fine now that I have put some more content around the anchor elements.
You can close this thread now.
Great support :-)Thank you – it’s all working just fine now that I have put some more content around the anchor elements.
You can close this thread now.
Great support :-)Unfortunately, it makes no difference… And I did try with many other values but no luck…
Any other ideas?
I would really love for this feature to work smoothly.You are correct – the problem is NOT there if I make the browser window a lot smaller.
Is there not a work around this issue? I can’t really just add more content to the anchor sections – just for the purpose of making the link underline work correctly.
Crossing my fingers :-) And thank you again for helping out here…Wow, thank you very much – you’re the man! :-)
Did you notice that the wrong anchor link is sometimes underlined/highlighted in the sticky submenu? Maybe it has something to do with the fact that two anchor elements are visible at the same time and the sticky submenu is confused on which link to underline…?
Or should I place the anchors differently maybe?Thank you Ismael.
The links just leads to more confusion but I did try and follow the conclusions there.
Status now is that, since I don’t have a Child Theme, I put the following code in the functions.php using the plugin “Code Snippets”. The plugin works with other issues regarding the functions.php file, so I would expect it to work fine also in this case.
————————————————————————————
// a custom script
// add current-menu-item class to active item
function ava_custom_script_mod() {
if ( wp_script_is( ‘avia-default’, ‘registered’ ) ) {
wp_add_inline_script( ‘avia-default’, ‘
(function($) {
$(document).ready(function() {
const setActive = (entry) => {
let item = $(#top .av-subnav-menu a[href*=\'+ entry + \']
);if(!item.attr(“href”).includes(entry)) return;
let list = item.parent(“li”);
let parent = list.parent(“#menu-sub-menu”);if(list.is(“.current-menu-item”)) return;
parent.find(“li”).removeClass(“current-menu-item”);
list.addClass(“current-menu-item”);
}const createObserver = (entry) => {
let el = document.querySelector(entry);const observer = new IntersectionObserver(function(entries) {
if(entries[0].isIntersecting === true) {
setActive(entry);
}}, { root: null, threshold: [0.1] });
observer.observe(el);
}const anchors = [“#dagsprogram”, “#grad”, “#praktisk”, “#indkvartering”, “#prisinformation”];
anchors.map(anchor => {
createObserver(anchor);
});
});
})(jQuery);
‘);
}
}
add_action( ‘wp_enqueue_scripts’, ‘ava_custom_script_mod’, 9999);
———————————————————————————————-In Quick CSS I put this:
#top .av-subnav-menu > li.current-menu-item a {
color: red !important;
text-decoration: underline !important;
}
———————————————————————————————-
The “Full Width Sub Menu” does not go in a Color Section. So let’s not go down that road…In the Full Width Sub Menu I did not add anything under Developer Settings.
The goal is simple: I want the active item to be underlined with a white line in the Sticky Submenu.
Please login and have a look. And advice what to do next. What am I missing here?
Thank you for a great support.
Thank you for getting back to me this fast… :-)
I want the Sticky Submenu to underline the active menu item.
I have added this PHP Snippet:
————————————————————————
// Highlight one page navfunction activateMenuItem(){
?>
<script>
jQuery(document).scroll(function() {
var sections = jQuery(‘.iconbox’),
menu = jQuery(‘.av-submenu-container’),
nav_height = menu.outerHeight();
jQuery(window).on(‘scroll’, function() {
var cur_pos = jQuery(this).scrollTop();
sections.each(function() {
var top = jQuery(this).offset().top – 300,
bottom = top + jQuery(this).outerHeight();
if (cur_pos >= top && cur_pos <= bottom) {
menu.find(‘li’).removeClass(‘active-menu-item’);
menu.find(‘a[href=”#’ + jQuery(this).attr(‘id’) + ‘”]’).parent(‘li’).addClass(‘active-menu-item’);
}
});
});
});</script>
<?php
}
add_action(‘wp_head’, ‘activateMenuItem’);
————————————————————————
And this CSS:
#top .av-submenu-container .active-menu-item,
#top .av-submenu-container .active-menu-item a {
text-decoration: underline !important;
}But still no underlined active item.
The menu items are set as “Button Style (Colored)” and I did try the “Default Style” in case the problem lays here. But nope…Great idea – thank you Guenni007
Have a look at https://fyrholtrejser.dk/rejser/test/ where you see the Sticky Submenu in action.
I am controlling the font size in this menu with the following CSS:#top .av-subnav-menu li a {
font-size: 17px;
}How do I make the active menu item underlined only in this Sticky Submenu?
Thank you Guenni007 – you have been very helpful – I really appreciate it :-)
All I had to do in this case was to add the second custom class; no-scroll to this:
PopupAnd now it looks good on both desktop and smartphone with no scrolling behind the popup :-)
Of course – my bad – thank you guys. Great support :-)
Now I just realized a new issue when using a smartphone:
The background seem to scroll to the top when clicking the trigger link. The popup is there alright but you have to scroll down in order to actually see it on a smaller screen.
Try it here on your smartphone: https://fyrholtrejser.dk/rejser/st-johann/#indkvartering
Click on the link: “Se evt. mere om hotellet her”
What to do?- This reply was modified 1 year, 10 months ago by RasMaster.
Wow, thank you very much – it works.
Do you by any chance have a solution on how to manage the width separately for smartphone versus desktop?I tried this – but it didn’t work:
@media only screen and (min-width: 990px) {
.mfp-inline-holder .mfp-content,
.mfp-ajax-holder .mfp-content {
width: 40vw;
}@media only screen and (max-width: 767px) {
.mfp-inline-holder .mfp-content,
.mfp-ajax-holder .mfp-content {
width: 80vw;
}Thank you very much – it did the job :-)
Is there a way to manage the width of the popup lightbox? Right now it’s fullwidth – and not very nice.Thank you very much. It all looks fine now :-)
Thank you – but we are not there yet:
You made the TikTok-icon work but with the title: “tiktokicon”
When I tried to rename the icon to “TikTok” everything went wrong and now it’s not showing anywhere.
Please help and please rename the icon to “TikTok” so it shows on mouse over. Just like the Instagram icon shows “Instagram”.
Thank you.Thank you very much, it all works – fantastic support!
Yes, please close and delete this topic.
It works – thank you :-)
Nope, it didn’t work… Still got those margins left and right of the columns/content in those color sections.
I added a custom class called: column_custom_classAnd this in Quick CSS:
.column_custom_class .container {
padding: 0;
}But no luck so far. See URL in private message.
Maybe the problem is to be solved elsewhere – a hidden page margin or something like that? What do you think?
It’s a mystery but you were right – problem solved when I started all over on new pages :-)
One last thing: Please have a look at the site now (see URL and login in private message) and let me know how I can remove the margins left and right of the columns in the color sections?
I did remove the space between columns successfully but I can’t explain what still causes the margins left and right of the columns/content in each color section. Hope you can help…See private message…
Also, how do I create a transparent background in a Text Block? It seems that a lot of the features from older versions of Enfold are gone now and my workflow is not the same anymore :-( Please have a look at the site and let me know if I am missing something here…
This reply has been marked as private.Thank you very much – mission accomplished :-)
This reply has been marked as private.Yes we moved it today. But please send me the additional CSS code if you can.
Thank you very much for this service.It works just fine in the footer :-) Thank you.
When viewing the RSS feed on a page the title link is still active. Can you help with that?This reply has been marked as private.It does not work for me….
I followed the guidelines and added this to my functions.php at the very end of the file. But nothing happens – and I actually just want the RSS-title-link to be deactivated. Please help me out here.
……………………………………………….
function itsme_disable_feed() {
wp_die( __( ‘No feed available, please visit the homepage!’ ) );
}add_action(‘do_feed’, ‘itsme_disable_feed’, 1);
add_action(‘do_feed_rdf’, ‘itsme_disable_feed’, 1);
add_action(‘do_feed_rss’, ‘itsme_disable_feed’, 1);
add_action(‘do_feed_rss2’, ‘itsme_disable_feed’, 1);
add_action(‘do_feed_atom’, ‘itsme_disable_feed’, 1);
add_action(‘do_feed_rss2_comments’, ‘itsme_disable_feed’, 1);
add_action(‘do_feed_atom_comments’, ‘itsme_disable_feed’, 1);remove_action( ‘wp_head’, ‘feed_links_extra’, 3 );
remove_action( ‘wp_head’, ‘feed_links’, 2 );I need guidelines from YOU – not a link to a generic article on the subject. Please help me out here…
I have a RSS Widget located in a Footer and the title is linking to the URL of the RSS-feed. I want to deactivate this title-link. Please advice.
There was no succes when adding the suggested code to functions.php.This reply has been marked as private. -
AuthorPosts