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:
- What’s the best way to use the Featured Image for responsive web design?
- 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
- Create Image Uploader for Widget
- Permanently remove first image from posts
- the_post_thumbnail() based on the Post ID
- Admin Media grid view images won’t load
- WordPress remove EXIF Data from specific Thumb
- How to resize image on client-side before upload?
- Adding Featured Image to Post programatically
- Get a Page’s attachments in Gallery order
- How to remove this function from the homepage?
- How to get custom image size for image uploaded in Customizer
- Using wp_get_image_editor in a standalone script
- Styling images coming from another blog
- IMG src weird behaviour inside a single post loop
- How to get media objects
- PHP code to call image Caption, Alternative Text, and Decription?
- How do I let users upload files to a chosen location?
- Change the URL of an image from wp_get_attachment_image_src except in the frontpage
- How to get specific image in media library with php
- hover image appears below placeholder instead of overlayed
- add_image_size for header_image
- Add custom url to featured image
- Get image’s size name from it’s dimension
- Displaying the last post on static homepage
- Best practice for migration friendly images in posts/pages?
- Get the post ID and display the images
- Reprinting tags with all attributes
- Unread Repeater field IMG alt not working
- Upload multiple images to a Woocomerce product
- What is the alternative to “ when it comes to calling Media (image) files in the ‘attachment.php’ file?
- Accessing an image folder inside public web directory
- Why is image hard cropping for one image using add_image_size not working?
- Enable custom logo upload if logo is not in header
- Let Users Choose Post Categories
- Scrape external webpage for first image and add it to new post
- How to make own crop image function for WordPress plugin
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- WordPress automatically adds links to uploaded images
- I restricted wordpress by logged users. It’s possible exclude a page?
- Pagination broken on is_front_page()
- How to include custom code on a page that’s set to act as homepage?
- Timthumb.php image gallery not working on Multisite WordPress
- Where are the src and srcset sizes coming from?
- HTML showing after PHP code in tag
- Only show first image in foreach loop
- trying to get wp_get_attachment_url to output clickable link
- Creating black and white copy of an image [closed]
- Shortcode function doesnt work without caption
- Get featured image with custom size outside WordPress
- Images Uploaded saving onto older/previous year folders
- Amend theme php to include certain category in header
- Add valid XHTML closing img tags to WordPress galleries
- Convert canvas to image and upload image to server
- show recent posts php code error?
- How to Make Thumbnail of Post Stay Animated
- page 1 is not paged
- Convert all uploaded PNG files to PNG-8 format
- foreach repeat html structure after every nth for attachment [closed]
- CSS images don’t show up with bloginfo
- how to show images without passing it to timthumb.php file for resizing
- Some problems in custom widget
- Displaying images outside the content
- Change extension to .jpg when webp is not supported
- Prepend to all image URLs with PHP, only for mobile devices
- Change the URL of an image from wp_get_attachment_image_src for Product Posts based on Category
- Configure WordPress to Use Responsive Image Rendering
- How to use data URL in WordPress?
- Replace background image with post thumbnail in shortcode
- Resize post thumbnail
- Where Do Image Dimensions Get Added To A Filename?
- Link to index.php from home.php?
- 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
- Get the image title and alt from custom query
- How to always display full size image
- what’s the syntax for if the image exists get the image?
- Different home page for logged off users
- Retrieving specific images from Media Library
- How to change this internal image link parameter using PHP?
- Pass php to database in JQuery: With AJAX?
- How to display html code on homepage
- How to hide something from custom home page with php code?
- Retrieve first image url from custom post with pagination
- Name Input from widget displays Sidebar name instead of saved data
- images in wordpress themes
- How to use custom fields to replace top-level parent title with an image using wp_list_pages?
- Crop images in both sides on wordpress [duplicate]
- How do I return an image from a script
- Display Post Titles on top of the_post_thumbnail()
- add if statement to the featured image
- WooCommerce: write featured image dimensions to custom fields in product’
- Generate and upload screenshot as featured image for user-submitted post
- 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