-
AuthorPosts
-
April 6, 2017 at 4:59 pm #773327
Hi Support-Team!
PHP is not my favorite… ;-)
So I ask you for a code-snippet for the functions.php (Child-Theme).
I’m looking for a connection between the “Animated Numbers” and “Portfolio Categories”:
- When Portfolio-Categorie “A” is selected, then the “Animated Numbers” should be displayed (Frontend).
- If Portfolio-Catgeorie “B” (or any other categorie) is selected, the “Animated Numbers” should NOT be displayed (Frontend).
- When both, or more Portfolio-Catgeories selected, then the “Animated Numbers” should also NOT be displayed (Frontend).
I made some presets with your Layout-Builder and it would be much easier to handle with the code I’m asking for ;-)
Best Regards,
NicApril 7, 2017 at 9:42 pm #774210Hi Guys!
Is there really no one who can help me out with this small snippet :-(
I think with knowledge in PHP it might be easy, but in PHP I’m a real fool…
Anyway, maybe someone reads this and has an idea, please share it with me ;-)
Best Regards,
NicApril 8, 2017 at 7:08 am #774321Hi Nic,
That would be considered customisation and is not included in theme support, if you should need someone to help you out with such functionality then we recommend that you contact Codable.
Best regards,
RikardApril 8, 2017 at 10:03 am #774415Hi Rikard!
Is this a customisation?
Yes, of course!
Like that one, e.g. “How can I hide the Author-Box on Blog-Pages”…
For this example, you are offering the code and most of the requests go in that direction, to hide, to change, to do anything – just customisation ;-)
This small snippet might be really easy – function > if > then > else – but I don’t know which Code I need to call for “Animated Numbers” and the “Portfolio Categorie id”, inside the Enfold Theme.
I agree, you don’t have to do the job, but you can give me a hint, that would certainly be quite simple for you, or anyone out there ;-)
Best Regards,
NicApril 10, 2017 at 1:34 pm #775455Hi Nic,
I think you can display your content inside a widget area conditionally using this plugin – https://wordpress.org/plugins/widget-logic/
You can enable debugging mode to see shortcodes you have created in pages using Advanced Layout Builder – http://kriesi.at/documentation/enfold/enable-advanced-layout-builder-debug/
Or, You can switch to Default Editor and click on Magic Wand to see full list of shortcodes http://i.imgur.com/n4KXkdm.jpg
then you can create any of them and copy/paste shortcode into any other content element or into text widget.Best regards,
YigitApril 10, 2017 at 3:41 pm #775519Hi Yigit!
Thank you for your Tips!!
For several days I try to find out how this can work.
I wrote this code and put it into the functions.php from my child-theme
function remove_aninum() { if(is_category(array(4))) { return (('.avia-animated-number').avia_sc_animated_number()); } else { return false; } } add_filter( 'av_animated_numbers', 'remove_aninum', 10, 2 );
But this has unfortunately no effect when I change the portfolio categories.
At least, no PARSE ERROR appears ;-))Maybe I’ll call the wrong action – “is_category” is probably not the same as “portfolio_entries”…
Do you, or anybody, have a little hint yet?
Best Regards,
NicApril 13, 2017 at 8:57 pm #777524Hi YouCanMore,
This code is wrong. This is from Javascript? and other things don’t make sense.
You should really try to hire a freelancer to this for you.If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.