Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #556635

    Hey at all,

    as refered in post: https://kriesi.at/support/topic/move-search-icon-to-secondary-menu/
    i changed a simple line in the functions-enfold.php

    Open the functions-enfold.php file in the theme directory and look for:

    /* AJAX SEARCH */
    if(!function_exists('avia_append_search_nav'))
    {
    	//first append search item to main menu
    	add_filter( 'wp_nav_menu_items', 'avia_append_search_nav', 10, 2 );
    
    	function avia_append_search_nav ( $items, $args )
    	{
    	    if ($args->theme_location == 'avia')

    But after an update of enfold al my changes are gone. “of course”
    Now i want to knoe if it is may possible to create a childtheme file of the enfold-functions.php so that my chges stay after an update!?

    Best regards
    Maik

    #556832

    Hey Maik!

    That does not look like all of the code your using.

    You can see at the start there is the “function_exists” line. Start from there and copy all of the code down to the ending bracket, }, and paste all of that into your child theme functions.php file and it will be used instead.

    if(!function_exists('avia_append_search_nav'))
    {
    all of the other code inside, 
    blah blah blah, 
    yada yada yada
    }
    

    Best regards,
    Elliott

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