-
AuthorPosts
-
March 3, 2020 at 9:49 pm #1189834
Specifying a custom column link such as https://www.mydomain.com/page_name/#anchor_name will not resolve to the linked page, click is being ignored even though link href is present in HTML source code. Removing the anchor will make it work. (Latest Enfold theme and WP)
March 4, 2020 at 8:54 am #1189953Hey spectodesign,
Where can we see and reproduce the problem you are having?
Best regards,
RikardMarch 4, 2020 at 9:42 pm #1190245Hi,
On https://www.spectodesign.com when you click on the “Strategy” column the column href is pointed to https://www.spectodesign.com/services/#technology. The two other columns “Creative” and “Technology” use the standard page selector and work fine.
March 6, 2020 at 11:44 am #1190830Hi spectodesign,
Can you disable caching and minification for now?
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaMarch 6, 2020 at 7:59 pm #1190966This reply has been marked as private.March 7, 2020 at 7:20 pm #1191150Hi,
When I look at your site all 3 columns link to /services/ can you link one to /services/#technology so we can see the error.
To remove the screen reader link from the columns, Try adding this code to the end of your functions.php file in Appearance > Editor:function custom_script(){ ?> <script> jQuery(window).load(function(){ jQuery('a.av-screen-reader-only').remove(); }); </script> <?php } add_action('wp_footer', 'custom_script');
Best regards,
MikeMarch 7, 2020 at 11:01 pm #1191178Please review the information in the private content section.
March 8, 2020 at 11:27 am #1191243Hi,
Thank you for the feedback, I tried recreating your page on my localhost and for the column links I used:http://test.test/index.php/elements/ http://test.test/index.php/elements#av_section_3 http://test.test/index.php/elements#av_section_4
Notice that between the page “elements” and the IDs “#av_section_4” there is no backslash just the hash tag. Please try adjusting your links like this, as this worked correctly for me.
Best regards,
MikeMarch 10, 2020 at 6:42 pm #1191973Please see my comments
March 11, 2020 at 1:58 pm #1192279Hi,
Perhaps your Permalink structure does have something to do with this, can we have an admin login to investigate? Since this is a dev site can we try different settings and disabling scripts and plugins to try to isolate this issue?Best regards,
MikeMarch 21, 2020 at 12:25 am #1194973Please see my comments below:
March 21, 2020 at 4:52 pm #1195098Hi,
Thank you for the login, I believe some javascript is capturing the hashtag click, I see you are using a child theme so I wonder if you have any javascript in your functions.php?
Please enable WordPress > Appearance > Editor by removingdefine( 'DISALLOW_FILE_EDIT', true );
from thewp-config.php
file to enable it unless your web hosting setup another way to manage this option.
I found that changing the hashtag to something else like a question mark allowed the url to work, but it won’t go to the anchor.
By the way you don’t seem to have a “technology” id on your /services/ page.
Anyways, on a new install the hashtags do work correctly.Best regards,
MikeMarch 23, 2020 at 4:38 pm #1195511Please see my comments from 3/23/2020 below:
March 24, 2020 at 1:49 pm #1196376Hi,
Thank you, I see there are many files and scripts in your child theme to go through to try to isolate the issue.
Can we also have FTP access? I’m thinking that if I copy all of your child theme files to my localhost I will be able to reproduce your error and then I can start removing scripts and files from my localhost until it is corrected.Best regards,
MikeMarch 24, 2020 at 5:20 pm #1196913One step closer…
March 25, 2020 at 12:18 pm #1197645Hi,
Good test, I copied your homepage to the bottom of the test page and the anchor link works, then I note that your homepage has this name “Home_feb2017” and your function.php has this reference:// Yoast SEO remove a page entry function sd_filter_wpseo_sitemap_entry( $url, $type, $object ) { // site_url( '/home_feb2017/', 'https' ); if( ! empty( $url ) ){ //error_log('url: '. $url['loc']); if( $url['loc'] === site_url( '/home_feb2017/', 'https' ) ){ return "";
So I believe that if you rename your homepage to a different name the link will work, I also believe that the reason the link is still not working when the functions.php is empty is due to your server cache.
Best regards,
MikeMarch 26, 2020 at 2:46 am #1197905It gets better…
March 26, 2020 at 2:08 pm #1198026Hi,
So the column link works fine unless it’s on the “homepage”?
I tested on my localhost and it works correctly even if it’s the “homepage”, strange.Best regards,
MikeMarch 26, 2020 at 6:09 pm #1198142More…
March 27, 2020 at 1:13 pm #1198323Hi,
I tried debugging the javascript for the column and found this:
if( (0 == url.indexOf("#")) || ((url.indexOf(link) >= 0) && (url.indexOf("#") > 0) ) )
on line 658 of\enfold\js\shortcodes.js
Perhaps if you were to comment out the “else” function of this rule the error will be corrected. Please see the screenshots in Private Content area.
After making this change you will need to clear your browser cache, and any other cache so the edited “shortcodes.js” will load, this can be a little tricky because the browser prefers to use the cache version of any .js file.
Unfortunately, I’m not able to reproduce your error so I can’t test if this will help, but this is where the link with the hashtag is getting modified.Best regards,
MikeMarch 27, 2020 at 7:56 pm #1198411avia_link_column is undefined and aborts click (start line 618)
April 16, 2020 at 5:41 pm #1204481 -
AuthorPosts
- The topic ‘Column Link not working for custom link with anchor’ is closed to new replies.