I’m trying to create WordPress theme for a website, and want to add a slideshow to the index.php. Since I don’t want to show posts on the index and only show the slideshow, can I just remove the WordPress Loop? Or I need to keep it? If I have to keep it, how can I do to only show the slideshow?
Thanks.
I wouldn’t mess with the index.php page just to remove the loop for the front page. You should create a new file called home.php, copy all content from index.php and remove the loop there. home.php will be used as your homepage and if you ever want to use the normal index.php then you still have it available.
You can even create a custom page template which is very easy to do.
You probably do not want to show posts in the home page.
If so then I suggest that you create a Static Front Page or Splash page instead.
You can remove the wordpress loop if you’re not needing to retrieve posts or replies, etc.
** However, I don’t recommend doing that as you may want to pull images from specific pages which would require
the loop
You can add Your own HTML and JS one Just follow these steps
1- Create a new HTML file using notepad (save it as slideshow.html) and past this code in it
2- Then create a new file with notepad and save it as swissarmy.js and past this in it “here is the code “
3- create another file with notepad and save it as slideshow.js and replace the images urls with the urls inside it Here is the Code
4- put all of these files in one folder and open the slideshow.js then replace the images with your own images and texts with the text you want
5- open the HTML file and it will work