Where to find "action button" html file on server to edit anchor text

Hi there,

I searched for 3 hours how to edit the action button link to an anchor text, because I’m not able for some reason to make it from customiser.

I put an anchor text on on section of one-page website, then when I go to the button editor and put #anchortext and publish - no change. When I reload the website and press the button only # appears like www.mywebsite.com/# and the user stay on top.

I use child theme. When I make the change with dev tools, everything is fine, but I’m not able to find where is this code on my server:

<a href="#anchortext" class="roll-button button-slider" target="_top">MY TEXT HERE</a>

Thanks in advance!

Hello,

You can try to activate the parent theme, deactivate all plugins except recommended, and see if it helps.

Also you can check this WordPress Codex page:
https://codex.wordpress.org/I_Make_Changes_and_Nothing_Happens

Kind Regards, Roman.

Thanks for the fast reply roman,

However, I’m not able to switch to main theme. When I try the following appears:

Warning: array_merge(): Argument #5 is not an array in /srv/disk12/2389932/www/mywebsite.com/wp-includes/widgets.php on line 1159

Warning: array_diff(): Argument #2 is not an array in /srv/disk12/2389932/www/mywebsite.com/wp-includes/widgets.php on line 1160

Warning: Invalid argument supplied for foreach() in /srv/disk12/2389932/www/mywebsite.com/wp-includes/widgets.php on line 1162

Warning: array_merge(): Argument #1 is not an array in /srv/disk12/2389932/www/mywebsite.com/wp-includes/widgets.php on line 1170

Warning: Cannot modify header information - headers already sent by (output started at /srv/disk12/2389932/www/mywebsite.com/wp-includes/widgets.php:1159) in /srv/disk12/2389932/www/mywebsite.com/wp-admin/includes/misc.php on line 1114

I think I need to locate the html to put in on child theme.

Hello,

You can try to rebuild your website in a staging environment or locally and see if it works as it should (then you will be able to move rebuilt website to production environment). Please remember about importance of regular full site backups (files and database):
https://codex.wordpress.org/WordPress_Backups

Here are helpful tutorials:



Kind Regards, Roman.

Thanks again @roman,

I will sure try to rebuild it. But before that I want to try everything possible, because it is time-consuming.

I was thinking - I remembered that @kharisblank recommended me to use Custom JavaScript plugin for video header background with this code:

(function($){
      
    "use strict"

  if( $('body').hasClass('home') ) {
    
    var mainTitle    = 'TEXT';
    var subTitle     = 'MORE TEXT';
    var buttonURL    = '#';
    var buttonLabel  = 'CLICK HERE';
    
    var heroContent  = '<div class="slide-inner">';
        heroContent += '<div class="contain text-slider">';
        heroContent += '<h2 class="maintitle">'+mainTitle+'</h2>';
        heroContent += '<p class="subtitle">'+subTitle+'</p>';
        heroContent += '</div>';
        heroContent += '<a href="'+buttonURL+'" class="roll-button button-slider" target="_top">'+buttonLabel+'</a>';
        heroContent += '</div>';

    $('.sydney-hero-area').append(heroContent);

  }  

})(jQuery); 

Is it possible to put the anchor link there somehow? Again, I’m using child-theme. Maybe there is a conflict between JS and the child-theme, because like I said in dev tools everything is workin fine.

But <a href="#anchortext" class="roll-button button-slider" target="_top">MY TEXT HERE</a> is not a JS… How/where to include it?

Thanks in advance!

Hello,

Try to replace this:

    var buttonURL    = '#';
    var buttonLabel  = 'CLICK HERE';

…with this:

    var buttonURL    = '#anchortext';
    var buttonLabel  = 'MY TEXT HERE';

…in the code that you have mentioned above.

Kind Regards, Roman.

@roman Thank you man! I have to learn coding finally :smiley:

Your support is awesome! I will upgrade in the future for sure! :slight_smile:

Great! You are welcome :slight_smile:

Please feel free to ask any other questions that you might have in future.

By the way, it would be nice if you leave your feedback for Sydney theme on WordPress.org (if you haven’t done it already, of course), here is a quick link :slight_smile:

Kind Regards, Roman.

Done :wink: Keep the perfect work …

Thank you very much! :slight_smile:

Kind Regards, Roman.