• This code appears at the top of very page <\/i>”,”library”:”fa-solid”},”toggle”:”burger”}” data-widget_type=”nav-menu.default”>.

    How do I get rid of it?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator t-p

    (@t-p)

    This may be a plugin or theme conflict. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

    ____

    If you can install plugins, install and activate “Health Check”: https://www.ads-software.com/plugins/health-check/
    It will add some additional features under the menu item under Tools > Site Health.
    On its troubleshooting tab, you can Enable Troubleshooting Mode. This will disable all plugins, switch to a standard WordPress theme (if available), allow you to turn your plugins on and off and switch between themes, without affecting normal visitors to your site. This allows you to test for various compatibility issues.
    There’s a more detailed description about how to use the Health Check plugin and its Troubleshooting Mode at https://make.www.ads-software.com/support/handbook/appendix/troubleshooting-using-the-health-check/

    1. Use Developer Tools: Browsers’ developer tools can help identify where the issue is originating from. Look for errors in the Console tab that might point you towards the problematic script or resource.
    2. Font Awesome Conflict: Since “fa-solid” is mentioned, there might be an issue with how Font Awesome icons are being called or loaded. Ensure you’re using the correct version of Font Awesome and that it’s properly enqueued in your theme’s functions file.
    Thread Starter geercom

    (@geercom)

    I don’t have a font awesome plugin. Where would I find settings for Font Awesome?

    Thread Starter geercom

    (@geercom)

    I used Health Check Troubleshooting tab. I disabled all plugins and then enabled them one at a time. In each case I viewed the default theme and there was no code showing. But in the theme I use, the code is still showing.

    When I see something like code showing where it shouldn’t, I typically find that the element was not closed properly or that particular string of code has an error in it that allows it to show live on the site. For example, I see this <\/i> and it makes me think that is what is happening here. Also, I see something about a burger toggle and then something about a default navigation menu.

    I am thinking that the code that is not closed properly is found somewhere in the site menu settings where you might enter code. The burger style menu only appears on the AMP version of my site. I was having trouble with broken pages and the burger menu showing up on the web version of my site where it should only appear on the mobile version.

    I fixed the latter issue when I renewed Elementor Pro. But now the code is showing on the site where there shouldn’t be any, and it happens to be right above where the navigation menu is. If someone could direct me to the path or potential paths in WordPress where the improperly closed or coded code might be, I think I can just properly close it or see how it is supposed to be and type that in.

    If you’re following what I’m saying, perhaps you have some ideas?

    @geercom , if you only see the codes when you are using the existing theme, then it could be that the codes are residing in your theme header.php file or the functions.php file.

    I suspect that it is the header.php file thou. Try looking for it in your themes folder via FTP, or Cpanel > File manager.

    If you do not have any coding background, make sure you save the existing file elsewhere before you edit it. In case things happen worsen, then you can restore the file.

    Thread Starter geercom

    (@geercom)

    WP DEBUG repeats this error:

    PHP Deprecated: Function create_function() is deprecated in … themes/lycra/functions.php on line 23

    I am including the text of the functions.php file.

    <?php

    /**

    • Lycra functions and definitions *
    • @package Lycra */

    function header_footer_elementor_support() {
    add_theme_support( ‘header-footer-elementor’ );
    }

    add_action( ‘after_setup_theme’, ‘header_footer_elementor_support’ );
    add_action( ‘wp_enqueue_scripts’, ‘lycra_scripts’ );

    remove_filter( ‘the_content’, ‘wpautop’ );

    remove_filter( ‘the_excerpt’, ‘wpautop’ );
    add_action(‘wp_logout’,create_function(”,’wp_redirect(home_url());exit();’));
    /**

    • Set the content width based on the theme’s design and stylesheet. */
      add_action(‘init’ ,’ezgz_buffer’);

    function ezgz_buffer () {
    ob_start(‘ob_gzhandler’);
    }
    add_action(‘in_widget_form’, ‘spice_get_widget_id’);

    function spice_get_widget_id($widget_instance)

    {

    if ($widget_instance->number=="__i__"){
    
     echo "<p><strong>Widget ID is</strong>: Pls save the widget first!</p>"   ;

    } else {

       echo "<p><strong>Widget ID is: </strong>" .$widget_instance->id. "</p>"; 
    
    }

    }

    if ( ! isset( $content_width ) ) {

    $content_width = 640; /* pixels */

    }

    if ( ! function_exists( ‘lycra_setup’ ) ) :

    /**

    • Sets up theme defaults and registers support for various WordPress features. *
    • Note that this function is hooked into the after_setup_theme hook, which
    • runs before the init hook. The init hook is too late for some features, such
    • as indicating support for post thumbnails. */

    function lycra_setup() {

    function themeslug_theme_customizer( $wp_customize ) {

    $wp_customize->add_section( 'themeslug_logo_section' , array(
    
        'title' => __( 'Logo', 'themeslug' ),
    
        'priority' => 30,
    
        'description' => 'Upload a logo to replace the default site name and description in the header',
    
    )

    );

    $wp_customize->add_setting( ‘themeslug_logo’ );

    $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, ‘themeslug_logo’, array(

    'label' => __( 'Logo', 'themeslug' ),
    
    'section' => 'themeslug_logo_section',
    
    'settings' => 'themeslug_logo',

    ) ) );

    }

    add_action(‘customize_register’, ‘themeslug_theme_customizer’);

    /*
    
     * Make theme available for translation.
    
     * Translations can be filed in the /languages/ directory.
    
     * If you're building a theme based on Lycra, use a find and replace
    
     * to change 'lycra' to the name of your theme in all the template files
    
     */
    
    load_theme_textdomain( 'lycra', get_template_directory() . '/languages' );
    
    
    
    // Add default posts and comments RSS feed links to head.
    
    add_theme_support( 'automatic-feed-links' );
    
    
    
    /*
    
     * Let WordPress manage the document title.
    
     * By adding theme support, we declare that this theme does not use a
    
     * hard-coded <title> tag in the document head, and expect WordPress to
    
     * provide it for us.
    
     */
    
    add_theme_support( 'title-tag' );
    
    
    
    /*
    
     * Enable support for Post Thumbnails on posts and pages.
    
     *
    
     * @link https://codex.www.ads-software.com/Function_Reference/add_theme_support#Post_Thumbnails
    
     */
    
    //add_theme_support( 'post-thumbnails' );
    
    
    
    // This theme uses wp_nav_menu() in one location.
    
    register_nav_menus( array(
    
        'primary' => __( 'Primary Menu', 'lycra' ),
    
    ) );
    
    
    
    /*
    
     * Switch default core markup for search form, comment form, and comments
    
     * to output valid HTML5.
    
     */
    
    add_theme_support( 'html5', array(
    
        'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',
    
    ) );
    
    
    
    /*
    
     * Enable support for Post Formats.
    
     * See https://codex.www.ads-software.com/Post_Formats
    
     */
    
    add_theme_support( 'post-formats', array(
    
        'aside', 'image', 'video', 'quote', 'link',
    
    ) );
    
    
    
    // Set up the WordPress core custom background feature.
    
    add_theme_support( 'custom-background', apply_filters( 'lycra_custom_background_args', array(
    
        'default-color' => 'ffffff',
    
        'default-image' => '',
    
    ) ) );

    }

    endif; // lycra_setup

    add_action( ‘after_setup_theme’, ‘lycra_setup’ );

    /**

    • Remove emotional icon */

    // Replaces the excerpt “more” text by a link

    function disable_wp_emojicons() {

    // all actions related to emojis
    remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ );
    remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 );
    remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ );
    remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ );
    remove_filter( ‘wp_mail’, ‘wp_staticize_emoji_for_email’ );
    remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ );
    remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ );

    // filter to remove TinyMCE emojis
    add_filter( ‘tiny_mce_plugins’, ‘disable_emojicons_tinymce’ );
    }
    add_action( ‘init’, ‘disable_wp_emojicons’ );
    function disable_emojicons_tinymce( $plugins ) {
    if ( is_array( $plugins ) ) {
    return array_diff( $plugins, array( ‘wpemoji’ ) );
    } else {
    return array();
    }
    }

    /**

    // Replaces the excerpt “more” text by a link

    function new_excerpt_more($more) {

       global $post;
    
    return '<a class="moretag" href="'. get_permalink($post->ID) . '"> Read the full article...</a>';

    }

    add_filter(‘excerpt_more’, ‘new_excerpt_more’);

    /**

    • Enqueue scripts and styles. */
      function lycra_scripts() {
      //wp_enqueue_style( ‘bootstrap.min’, get_template_directory_uri() . ‘/plugin/bootstrap/bootstrap.min.css’ );
      wp_enqueue_style( ‘lycra-style’, get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( ‘thread_comments’ ) ) { wp_enqueue_script( 'comment-reply' ); }

    }
    /**

    • Implement the Custom Header feature. */

    //require get_template_directory() . ‘/inc/custom-header.php’;

    /**

    • Custom template tags for this theme. */

    require get_template_directory() . ‘/inc/template-tags.php’;

    /**

    • Custom functions that act independently of the theme templates. */

    require get_template_directory() . ‘/inc/extras.php’;

    /**

    • Customizer additions. */

    require get_template_directory() . ‘/inc/customizer.php’;

    /**

    • Load Jetpack compatibility file. */

    require get_template_directory() . ‘/inc/jetpack.php’;
    require get_template_directory() . ‘/function/wp_bootstrap_navwalker.php’;
    require get_template_directory() . ‘/function/testimonials.php’;

    Moderator t-p

    (@t-p)

    PHP Deprecated: Function create_function() is deprecated in … themes/lycra/functions.php on line 23

    The error suggest your theme is outdated, not compatible with PHP.

    – You may bring this to the attention of the theme’s developers.

    -Alternately, find another theme.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘This code shows at the top of every page’ is closed to new replies.