Taking over a WordPress site, trying to figure out how jQuery is working here.

[ad_1]

Hi everyone,

I’ve just taken a job working on a pre-existing WordPress site, and I was given a bug to fix but have been unable to make any progress. I have worked with WordPress before, but I guess I need to brush up on some things as it was a while ago.

The problem I am having seems to be with jQuery. In the Theme File Editor, the previous developers wrote a jQuery function to add additional social buttons to two embedded Instagram feeds that looks something like this:

jQuery(‘#instagram-feed-container .social-button’).after(‘…long HTML string for more social buttons’);

The function seems to work. The extra buttons appear on the live site and in the draft preview. However, I need to update them so that they link to the correct social accounts (they currently both point to the same account instead of two different ones because they used one function and added the same links with the same hrefs to both feeds).

However, any changes I make to the .js file in the Theme File Editor don’t seem to be taking effect in the preview of the site. I have purged the cache for WP Rocket. I have cleared my browser history. I have cleared the cache of the individual page I am trying to edit. This seemed like a simple fix, but I’ve been unsuccessful at making any changes for a couple hours now. I haven’t found any other source these buttons could be coming from.

Can anyone point me in the right direction? I’ll try to supply more details if they are needed, I’m just not sure what else is needed at this point.

[ad_2]
1 Comment

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer