Anchor Link Button Broken Again

I fixed this once before with a jquery script that I picked up fromm this forum about 3 months ago. It was supposed to a be a temporary fix until the next update. It worked for a few months but now it is broken again.

Website Page: http://www.digitaldoghouse.com/services/suas/

Theme: Pro version 2.2.5

Hey there,

Thanks for writing in! Can you please check for the following first:

  1. Clear all caches including browser cache then deactivate your caching plugins and other optimization plugins.

  2. If you’re using a CDN, please clear the CDN’s cache and disable optimization services.

  3. Test for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

  4. Remove custom CSS, JavaScript and deactivate your child theme and switch to parent theme (take a complete backup first).

Let us know how this goes!.

I can seem to upload or copy and paste the code from header.php in the ticket system and have it format correctly


The code below from header.php breaks the functionality of the anchor scroll button

<?php

    // =============================================================================
    // HEADER.PHP
    // -----------------------------------------------------------------------------
    // The site header.
    // =============================================================================

    ?>
    	<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />
        
        <!--Thumbnail Open Graph Meta Tags-->
        <meta property="og:title" content="BadDog Digital Productions, Inc.">
        <meta property="og:description" content="Web Development, 3D Modeling, Drone Services...Everyone else just BYTES!">
        <meta property="og:image" content="http://www.digitaldoghouse.com/wp-content/uploads/2018/05/BusinessCard_LRG-TEXT.jpg">
        <meta property="og:url" content="http://www.digitaldoghouse.com">
        
        <!--Twitter Thumbnail Open Graph Meta Tags-->
        <meta name="twitter:title" content="BadDog Digital Productions, Inc. ">
        <meta name="twitter:description" content=" Web Development, 3D Modeling, Drone Services...Everyone else just BYTES!">
        <meta name="twitter:image" content=" http://www.digitaldoghouse.com/wp-content/uploads/2018/05/BusinessCard_LRG-TEXT.jpg">
        <meta name="twitter:card" content="summary_large_image">
        

    <?php x_get_view( 'header', 'base' ); ?>

This version does not break functionality any reason why?

<?php

// =============================================================================
// HEADER.PHP
// -----------------------------------------------------------------------------
// The site header.
// =============================================================================

?>
<?php x_get_view( 'header', 'base' ); ?>

	<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />
    
    <!--Thumbnail Open Graph Meta Tags-->
    <meta property="og:title" content="BadDog Digital Productions, Inc.">
    <meta property="og:description" content="Web Development, 3D Modeling, Drone Services...Everyone else just BYTES!">
    <meta property="og:image" content="http://www.digitaldoghouse.com/wp-content/uploads/2018/05/BusinessCard_LRG-TEXT.jpg">
    <meta property="og:url" content="http://www.digitaldoghouse.com">
    
    <!--Twitter Thumbnail Open Graph Meta Tags-->
    <meta name="twitter:title" content="BadDog Digital Productions, Inc. ">
    <meta name="twitter:description" content=" Web Development, 3D Modeling, Drone Services...Everyone else just BYTES!">
    <meta name="twitter:image" content=" http://www.digitaldoghouse.com/wp-content/uploads/2018/05/BusinessCard_LRG-TEXT.jpg">
    <meta name="twitter:card" content="summary_large_image">

Hello There,

You are modifying the wrong file. Please remove your header.php file in your child theme. The correct way of doing is by following the steps below:

1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// VIEWS/HEADER/BASE.PHP
// -----------------------------------------------------------------------------
// Declares the DOCTYPE for the site, includes the <head>, opens the <body>
// element as well as the .x-root <div> and .x-site <div>.
// =============================================================================

$x_root_atts = x_atts( apply_filters( 'x_root_atts', array( 'id' => 'x-root', 'class' => 'x-root' ) ) );
$x_site_atts = x_atts( apply_filters( 'x_site_atts', array( 'id' => 'x-site', 'class' => 'x-site site' ) ) );

?>
<!DOCTYPE html>

<html class="no-js" <?php language_attributes(); ?>>

<head>

	<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />
    
    <!--Thumbnail Open Graph Meta Tags-->
    <meta property="og:title" content="BadDog Digital Productions, Inc.">
    <meta property="og:description" content="Web Development, 3D Modeling, Drone Services...Everyone else just BYTES!">
    <meta property="og:image" content="http://www.digitaldoghouse.com/wp-content/uploads/2018/05/BusinessCard_LRG-TEXT.jpg">
    <meta property="og:url" content="http://www.digitaldoghouse.com">
    
    <!--Twitter Thumbnail Open Graph Meta Tags-->
    <meta name="twitter:title" content="BadDog Digital Productions, Inc. ">
    <meta name="twitter:description" content=" Web Development, 3D Modeling, Drone Services...Everyone else just BYTES!">
    <meta name="twitter:image" content=" http://www.digitaldoghouse.com/wp-content/uploads/2018/05/BusinessCard_LRG-TEXT.jpg">
    <meta name="twitter:card" content="summary_large_image">


  <?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>

  <div <?php echo $x_root_atts; ?>>

    <?php do_action( 'x_before_site_begin' ); ?>

    <div <?php echo $x_site_atts; ?>>

    <?php do_action( 'x_after_site_begin' ); ?>

3] Save the file named as base.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/x-child/framework/views/header/

You will need to create the folder path since it does not exist in the child theme yet.

If you need anything else, please let us know.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.