Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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,
    Nic

    #774210

    Hi 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,
    Nic

    #774321

    Hi 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,
    Rikard

    #774415

    Hi 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,
    Nic

    #775455

    Hi 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,
    Yigit

    #775519

    Hi 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,
    Nic

    #777524

    Hi 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

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.