-
AuthorPosts
-
November 25, 2015 at 8:38 am #542200
Pew you’re request I am making a separate post for this issue.
I created the custom class option option using the code in functions.php from http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ but it’s not working when used for a quick link.
See http://173.254.96.214/~ronspubh/football/
The button at the top that says AFC Schedules has this link: http://173.254.96.214/~ronspubh/football/#afc
I gave a 1/1 column the custom class “afc”. I assumed this would also act as a section ID like in the color section, since the article at http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ was referenced in response to a forum post about adding section ID’s to other elements.
But it appears it is not working like that at all. Does it only give the element a custom css class, but not a section ID that can be used in a #section-id quick link?
If so, how can I add section id’s to other elements so that I can make quick link that scroll down the page like when doing so with a color section?
Thanks,
RobNovember 25, 2015 at 12:58 pm #542346Hey robphat!
It only gives your elements a custom CSS class. To give unique ID’s, please use Color Section or Grid Row elements.
Best regards,
YigitNovember 25, 2015 at 3:43 pm #542481I can’t use grid rows or color sections because I have a sidebar.
I can just add the quick link manually in a text box with , but then when I click on anchor, that doesn’t scroll smoothly down to id like it does when the id is in a color section. It just pops there automatically.
So how can I get it to scroll smoothly there like it does on a color section?
November 25, 2015 at 4:51 pm #542531Hey!
Workaround would be giving your element a custom CSS class and then add following code to Functions.php file in Appearance > Editor
function add_custom_href(){ ?> <script> jQuery(window).load(function(){ jQuery('.your-custom-class').attr('id','afc'); }); </script> <?php } add_action('wp_footer', 'add_custom_href');
Cheers!
YigitNovember 25, 2015 at 5:17 pm #542560I copied that code exactly into functions.php but it did nothing.
The issue is that adding a custom class to an column element does not add the (or equivalent) code to the site. I didn’t see it in the source code at all.
When I manually add it in a text element, then you can see it in the source code, but even with the code you gave me, it still doesn’t scroll there. It just pops there. You can see this for the #afc link on that page now. I manually added it with text quick link afc text
Did I enter the code wrong into functions.php ?
November 26, 2015 at 11:42 am #543011Hi!
Do you mind creating a temporary admin login and posting it here privately?
Cheers!
YigitNovember 30, 2015 at 7:02 pm #544738Sure. Will post in private
December 1, 2015 at 7:18 pm #545498Hi!
Instead, please add Code Block element to your page and add
<div id="your-custom-id"></div>
and place that code block element where you would like to link your button and add following code to Quick CSS in Enfold theme options under General Styling tab
#your-custom-id { clear: both; }
Best regards,
YigitDecember 11, 2015 at 6:14 pm #551220Sorry for late reply, but thanks for that code. It worked.
But what is strange is that I am using that theme at http://www.lapolla.com/lapolla-spray-foam-insulation-roof-products-rigs-equipment/ and the color section ID’s work fine there (although they pop down instead of scrolling). Do you have any idea whey it’s not working normally on http://173.254.96.214/~ronspubh ?December 16, 2015 at 2:09 pm #553664Hey!
you are using an old version. Please upgrade to Enfold v3.4.6.
Remove all custom css code to check which one could cause the issue. Also deactivate all plugins, to make sure none is causing any conflict.
Cheers!
Andy -
AuthorPosts
- You must be logged in to reply to this topic.