No it would not be a viable solution. Never hard-code content like that.
Assuming you have a slider, you should create a custom post type (or use a plugin like ACF to create a repeater field.
Then you’d query a loop of either said posts or fields, and create the appropriate html markup. That way the slides are editable via wp-admin.
Hope that helps.
Related Posts:
- How do I change/modify the_post_thumbnail(); html output?
- What’s the best way to use the Featured Image for responsive web design?
- How to add a class to the attachment images
- How do I hook into WordPress to save an uploaded photo as an alternate size to an existing photo?
- How to check if image is already stored in a site’s post database? (network)
- Adding a custom image upload size and making it selected by default?
- Hide custom image sizes from media library
- Change the filename format of saved featured images
- How to draw media details for Isotope gallery using Photoswipe
- How to register images uploaded via FTP in media library?
- Create Image Uploader for Widget
- Using file_exists to check file in Uploads
- Permanently remove first image from posts
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- Rename image uploads with width in filename
- the_post_thumbnail() based on the Post ID
- Admin Media grid view images won’t load
- WordPress remove EXIF Data from specific Thumb
- Debugging upload problem: What part of WP does actual image-resizing?
- Add Adsense code in index.php
- How to resize image on client-side before upload?
- Adding Featured Image to Post programatically
- Add custom image sizes to media uploader
- Conditional Statement – check if post has an attachment image
- How to upload imagick resource to media in wordpress
- Use Filename for Alt and Title Tags
- Change Width of Featured Image Thumbnail on Add/Edit Post Page
- Get a Page’s attachments in Gallery order
- Use Timber/Twig to pull an image by image ID [closed]
- Adding graphics to 404.php page
- How do I get images (with a thumbnail preview) to show in search results?
- How to remove this function from the homepage?
- How to get custom image size for image uploaded in Customizer
- Add custom HTML to posts page
- Featured images duplicating and replacing next image
- Get list of posts from attachment
- I can’t load my images from a js file using wp_localize_script
- Having trouble with customizing blog posts on the home page
- How to create an unordered list of images separate from the content
- image on homepage disappeared due to change of permalink name
- Get the image title and alt from custom query
- How to include different html tags in the header for different pages?
- How to always display full size image
- what’s the syntax for if the image exists get the image?
- How do I get the featured post to share on Social Media and show on Individual Post pages?
- Different home page for logged off users
- Insert div after every three posts in home.php [duplicate]
- Retrieving specific images from Media Library
- How do I routinely extract the thumbnail of the most recent post?
- How to change this internal image link parameter using PHP?
- add class to background image
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- Save the outputted image into the Media Library, with a different filename and extension
- Pass php to database in JQuery: With AJAX?
- How to display html code on homepage
- How to resize an image server-side before upload?
- Use page.php for front page
- How to hide something from custom home page with php code?
- Creating image gallery in wordpress
- Retrieve first image url from custom post with pagination
- Image limit from 1 to 5
- Name Input from widget displays Sidebar name instead of saved data
- Gallery requires a featured image but does not show it in posts/pages
- Snapshot Theme from WooThemes — empty ‘alt’ attribute
- Changing 2011 theme header image based on user dropdown
- Setting post thumbnail sizes in template file and functions.php
- Adding if statement to content for homepage
- images in wordpress themes
- Determine if only one image attached to a post/page
- How to use custom fields to replace top-level parent title with an image using wp_list_pages?
- I want Page titles and excerpts to show up on home.php in certain order
- Crop images in both sides on wordpress [duplicate]
- upload images on front by user using form
- How do I return an image from a script
- PHP-Code inside Href-Tag
- HTML in PHP problem [closed]
- Where to store the images of a custom WordPress theme?
- Display Post Titles on top of the_post_thumbnail()
- add if statement to the featured image
- An automatic way to crop images of different sizes
- Not able to see the error [closed]
- How to remove the intro animation which appears during the load up of some WordPress themes? [closed]
- How to automatically convert images to WebP on WordPress?
- Remove default Image Sizes
- Understanding responsive imagery
- WooCommerce: write featured image dimensions to custom fields in product’
- Generate and upload screenshot as featured image for user-submitted post
- bloginfo url in javascript
- Use URL query string in img src attribute
- Add/alter image attribute before render
- How Create Automatically Image jpg.webp from image .jpg without delete or change original images upload
- Using Featured Image as Hero Background in Word Press
- How can add alt tag in following code. Image are showing dynamic in wordpress
- Adding caption to all images inside an article
- How to add a shortcode for an image in the following function
- HELP PLEASE PHP slider css
- Restricting Image Upload Sizes using ‘wp_handle_upload_prefilter’ – Stuck media progress bar when Featured Image?
- Image alt tag is showing post title instead of Alt Text
- Responsive images, per image type?