“Show more” button help (JS and CSS)

[ad_1]

I’m a highly inexperienced coder and posted yesterday to get some help creating a “Show more” button for posts in my search results section on my site. Someone was able to edit my code to get most of the way there, but I ran into a couple issues I could still use help with:

1. I don’t know how to create a JS file, which I seem to need in order to trigger the function of the button. I have the necessary JS code, but I don’t know how to create a JS file.
2. I also seem to need to then enqueue the JS file using custom CSS and I need to “set CSS for .showStuff to make it closed and .openMe so it opens.” I don’t have a clue how to do this, as I’ve never used CSS (to my knowledge. My only experience with coding is editing a results.php file for my search results and using shortcodes within the WordPress block framework).

Thanks in advance for any help you can provide!

[ad_2]

 

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