Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1464152

    Hi there,

    I have two different market locations on one website.

    I have been able to make different menus for each, but now need help showing a different logo and different footer for select page ID’s. Help? Thanks!

    #1464203

    Hey lobstahhhhhhh,

    Thank you for the inquiry.

    To display different logo for a specific page, you can use this filter in the functions.php file:

    add_filter('avf_logo','avf_change_logo');
    function avf_change_logo($logo)
    {
        if(is_page(123) ) {
           $logo = "http://site.at/wp-content/themes/kriesi/images/logo.png";
        }
        return $logo;
    }
    

    Unfortunately, there is no option or filter for custom footer.

    Best regards,
    Ismael

    #1464261

    Thank you so much! I’m not sure were to insert that code into php.

    Please see a copy of the 1st lines of code in there now. Could you tell me where to insert?

    <?php
    if( ! defined( ‘ABSPATH’ ) ) { die(); }

    global $avia_config;

    if( ! is_array( $avia_config ) )
    {
    $avia_config = array();
    }

    /**
    * With WP 5.8 block editor was introduced to widget page. This is not supported by Enfold.
    * Based on https://wordpress.org/plugins/classic-widgets/ we disable this feature.
    *
    * For users who need to use it we updated our widgets but preview is not supported properly.
    *
    * ACTIVATING THIS FEATURE IS NOT SUPPORTED and in trial beta !!
    * =============================================================
    *
    * @since 4.9 started to update widgets to support Block Widget editor – but this is only in trial BETA and preview is not supported properly !!
    */
    if( ! current_theme_supports( ‘avia_enable_widgets_block_editor’ ) )
    {
    // Disables the block editor from managing widgets in the Gutenberg plugin.
    add_filter( ‘gutenberg_use_widgets_block_editor’, ‘__return_false’ );

    // Disables the block editor from managing widgets.
    add_filter( ‘use_widgets_block_editor’, ‘__return_false’ );
    }

    /*
    * if you run a child theme and don’t want to load the default functions.php file
    * set the global var below in you childthemes function.php to true:
    *
    * example:
    *
    * global $avia_config;
    * $avia_config[‘use_child_theme_functions_only’] = true;
    *
    *
    * The default functions.php file will then no longer be loaded. You need to make sure then
    * to include framework and functions that you want to use by yourself.
    *
    * This is only recommended for advanced users
    */
    if( isset( $avia_config[‘use_child_theme_functions_only’] ) )
    {
    return;
    }

    add_filter( ‘wp_nav_menu_args’, ‘my_custom_wp_nav_menu_args’ );

    /**
    * Display Different Menu Based on Page Type
    */
    add_filter(‘wp_nav_menu_args’, ‘my_custom_wp_nav_menu_args’);

    function my_custom_wp_nav_menu_args($args) {
    if (isset($args[‘theme_location’]) && $args[‘theme_location’] === ‘avia’) {
    // List of specific page IDs
    $specific_pages = array(3814, 3827, 3825, 3823, 3821, 3818, 3816);

    if (is_page($specific_pages)) {
    $args[‘menu’] = ‘Lil Audreys menu’;
    } else {
    $args[‘menu’] = ‘Audreys Market Menu’;
    }
    }
    return $args;
    }

    /**
    * Disable loading of non active plugin support
    */
    $checkfile = trailingslashit( pathinfo( __FILE__, PATHINFO_DIRNAME ) ) . ‘config-include.php’;
    if( file_exists( $checkfile ) )
    {
    require_once $checkfile;
    }

    /*
    * create a global var which stores the ids of all posts which are displayed on the current page. It will help us to filter duplicate posts

    #1464291
    This reply has been marked as private.
    #1464331

    Hi,
    I believe that this is a duplicate thread, please review your other thread

    Best regards,
    Mike

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