-
AuthorPosts
-
July 6, 2017 at 1:38 am #816973
hey there,
i need a little bit help. i got a few main menu links with anchors to the same page. the problem is the corlor of the “active” section. i found some threads, but no solution.
i need the active section highlighted. not all :-)
July 6, 2017 at 4:15 am #817005Hey volmering,
Can you elaborate on the issue a bit more. I’m not understanding what you need.
Best regards,
Jordan ShannonJuly 6, 2017 at 9:42 am #817105hey jordan, thanks for helping.
my english is not that good. but i try it.
in the main menu i got two individual links with anchor-id’s. almost like a one-page-design.
when you go to the startpage these two menu-items (ABOUT and NEWS) are already green instead of red. but they should only turn to green when i clicked one of them and the page scrolls down to the colorsection.
July 6, 2017 at 3:38 pm #817298Hi,
I see so you want them to remain red until you click to view that section?
Best regards,
Jordan ShannonJuly 6, 2017 at 3:42 pm #817302yes, f.e.
you click on NEWS. the page scrolls down to the news-section (id news) and the color turn to green (active).
click on ABOUT —>NEWS turn to red –> the page scrolls to the about-section (id about) and ABOUTt turns to green.
but this is not a new question. i think im not the only who whants to know the solution
- This reply was modified 7 years, 4 months ago by volmering.
July 6, 2017 at 4:24 pm #817331Hi,
Would you be able to provide admin info so I can log in and look into this further. Perhaps it can be fixed with some JQuery.
Best regards,
Jordan ShannonJuly 6, 2017 at 5:54 pm #817404hey jordan, logindata below
but i need to know what you do. i want to make it safe for updates. if u need jquery then i like to use my enfold child
July 6, 2017 at 6:00 pm #817409Hi,
Anything placed within functions.php will be update proof.
Best regards,
Jordan ShannonJuly 6, 2017 at 6:02 pm #817412cool thx
July 6, 2017 at 6:37 pm #817434Hi,
No problem. I just need a little time to configure the js and I’ll let you know when its ready to test.
Best regards,
Jordan ShannonJuly 6, 2017 at 11:33 pm #817537Hi,
Can you make the functions file writeable? I’m not able to save.
Best regards,
Jordan ShannonJuly 6, 2017 at 11:35 pm #817538done :-)
July 7, 2017 at 4:27 am #817570Hi,
It is still not writable. Please see the following https://codex.wordpress.org/Changing_File_Permissions
Best regards,
Jordan ShannonJuly 7, 2017 at 8:21 am #817661hey jordan see below plz
July 7, 2017 at 3:30 pm #817885Hi,
I logged into FTP and the changes still did not apply. The files on ftp don’t match what is currently on the dashboard so there is a weird disconnect somewhere.
Best regards,
Jordan ShannonJuly 7, 2017 at 3:31 pm #817886hzmm, weired. ist is possible to post the snippet?
July 7, 2017 at 3:37 pm #817891Hi,
I have to work through it live on the site so I know it actually works. As it is right I’m sure it wouldn’t work.
Best regards,
Jordan ShannonJuly 7, 2017 at 3:41 pm #817893hmm, the website is in the folder:
July 7, 2017 at 3:48 pm #817897Hi,
See private
Best regards,
Jordan ShannonJuly 7, 2017 at 3:51 pm #817902see below
July 7, 2017 at 3:56 pm #817905Hi,
No problem at all, see below.
Best regards,
Jordan ShannonJuly 7, 2017 at 3:57 pm #817906ok, ill check it.
July 7, 2017 at 4:00 pm #817908Hi,
Okay great. Again the files in that folder are identical to what you have on the wp-dash
Best regards,
Jordan Shannon- This reply was modified 7 years, 4 months ago by Jordan Shannon.
July 8, 2017 at 8:56 am #818117hey jordan, so weired :-)
i can change the functions php in the goj-connection backend:
<?php /*HELLO JORDAN */ add_filter('avf_title_args', 'fix_single_post_title', 10, 2); function fix_single_post_title($args,$id) { if ( is_single() ) { $args['title'] = get_the_title($id); } return $args; } /*TITEL Kategorie Löschen */ add_filter('avf_which_archive_output','avf_change_which_archive', 10, 3); function avf_change_which_archive($output) { if(is_category()) { $output = single_cat_title('',false); } return $output; } /*Kontaktformular */ add_filter('avf_form_mail_field_values', 'avia_change_checkbox_return_values', 10, 4); function avia_change_checkbox_return_values($value, $new_post, $form_elements, $form_params){ if($value == 'false') $value = 'Nein'; if($value == 'true') $value = 'Ja'; return $value; } /*Lightbox Gruppierung */ function add_custom_script(){ ?> <script> (function($){ $(window).load(function() { $(".avia_textblock .lightbox-added, .avia-image-container .lightbox-added").magnificPopup({ type: 'image', mainClass: 'avia-popup mfp-zoom-in', gallery: { enabled: false, }, callbacks: { imageLoadComplete: function() { var self = this; setTimeout(function() { self.wrap.addClass('mfp-image-loaded'); }, 16); } } }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'add_custom_script'); /*Remove sidebar on 404 pages */ add_filter('avia_layout_filter', 'avia_change_post_layout', 10, 2); function avia_change_post_layout($layout, $post_id) { if( is_404() ) { $layout['current'] = $layout['fullsize']; $layout['current']['main'] = 'fullsize'; } return $layout; } /* NEXT PREV Button nur in einer Kategorie */ add_filter('avia_post_nav_settings', 'avia_post_nav_settings_mod'); function avia_post_nav_settings_mod($settings) { $settings['is_fullwidth'] = false; $settings['same_category'] = true; return $settings; }
July 8, 2017 at 10:04 pm #818296Hi,
You did this from the wp dash? Perhaps your user rights are above mine?
Best regards,
Jordan Shannon- This reply was modified 7 years, 4 months ago by Jordan Shannon.
July 9, 2017 at 1:10 pm #818367yes, wp dash and with the same account
July 10, 2017 at 1:03 am #818486Hi,
This is what I’m seeing on your WP-Dash. It’s not matching up:Best regards,
Jordan ShannonJuly 10, 2017 at 11:13 am #818633omg sorry. see below
July 10, 2017 at 4:20 pm #818835Hi,
Okay now we’re cooking. I put the following in functions.php and it works. You just need to put the news anchor.
function HomePageAnchorCorrection() { echo '<script type="text/javascript"> // Document ready jQuery(document).ready(function(){ jQuery("#menu-item-367 a .avia-menu-text").css("color", "#b9212d").click(function(){ jQuery("#menu-item-367 a .avia-menu-text").css("color", "#19cc8a"); jQuery("#menu-item-297 a .avia-menu-text").css("color", "#b9212d"); }); jQuery("#menu-item-297 a .avia-menu-text").click(function(){ jQuery("#menu-item-297 a .avia-menu-text").css("color", "#19cc8a"); jQuery("#menu-item-367 a .avia-menu-text").css("color", "#b9212d"); }); }); </script>'; } add_action( 'wp_head', 'HomePageAnchorCorrection' );
Best regards,
Jordan ShannonJuly 10, 2017 at 5:01 pm #818868thx a lot for your help. can be closed
-
AuthorPosts
- The topic ‘Main Menu with Anchor Links active’ is closed to new replies.