How to compile the JS file to use a React component in a WordPress theme if I do not need SSR?

I have a WordPress theme and for a part of it I want to use a React component (I don’t need SSR). I have used create-react-app in the past but now I have this code:

How can I recreate the clickable image carousel?

My question is how can I recreate the image menu (actually I don’t eve know what’s the proper name) from this site: ? The one at the “Discover friends, family, and purpose” …

Size of HTML elements are different when inspecting with browser tools vs. getting size with Javascript

I’m using several different methods in my Javascript file to get the height of a fixed header on my site and in turn set that height as the padding for the main content (so that on load the content …

.click() on hidden input button doesn’t work (undefined)

I’ve spent hours and read countless stackoverflows but I can’t get this to work. I’ve got a form (Caldera Form in Wordpress) that has a submit button (in fact it’s an input tag). Via JS I added an …

Change the button/icon when the form is sent

Im trying to create a very simple HEART button plugin on Wordpress. It is one of my very first plugins. What I am trying to do is when the button in the form is clicked, so the icon that is inside it, …

Uncaught TypeError: $ is not a function at (index):2

I faced with this error on my Wordpress website “Uncaught TypeError: $ is not a function at (index):2” I found this solution to add var $ = jQuery.noConflict(); before the $( document )….

Different style being pulled for link attached to image, causing unwanted layers

I need to update a highly-customized WP website to add a SecureTrust logo and link on the site in a specific location beside other certified seals in the footer. I attempted to insert the JavaScript into the footer.php but it didn’t work/wasn’t recognized. As a work around I edited the style css to show the SecureTrust logo and then added an anchor in the html to place the link. The SecureTrust logo is now in place, however the “link” is connecting to a media style and pulling up the site logo, not the .securetrust style in the css. Images are

fix WordPress api failed upload test error

I have created a form which uses ajax to post data to WordPress media using WordPress API. I am receiving the error specified file failed upload test. I’m using the JWT auth plugin for authentication. ADD A MEDIA FORM CREATE MEDIA FUNCTION I could not find a php.ini file on the hosted directory so created a blank file and set file_uploads = on but that didn’t work. I looked in the file wp-admin/includes/file.php but don’t know if anything needs changing. I have checked and there is no other file with the same name in the WordPress media. UPDATED Following the

My css code in Word Press is working for every other page in the website when i only want it to work for 1 page

I have currently made a code in CSS, which I wanted for a particular page but unfortunately, it is working for every other page as well and it makes the other pages look quite broken since the formatting of them goes very odd. The solutions I have tried so far are: Using the unique code of the page and making it something like this – * .post-id-17 .stop {code here} But I got no results from using this solution. Here is the HTML code: Here is the CSS code: Here is the javascript code: If you have any ideas in

How to set default variable in JSX for const with selector

I am fairly experienced with PHP and WordPress theming, but now struggling with the new Gutenberg editor. I have created a custom block plugin, which involves a lot of JS (React). To the latter I am a bit new. The block is creating a simple wrapper div with a html lang attribute assigned to it based on the input of a selector. The following code is working fine, however only when the selector is changed. By default the langCode variable remains empty. Any idea what goes wrong? Answer This should be working: EDIT: Couldn’t reproduce the still existing error. So