How to Create a Custom Single Attachments Template in WordPress

If you want a particular post or post type to stand out from the rest of your content, you may want to consider creating a custom single-post template. This template will only be applied to the post(s) you assign it to, meaning it can have an entirely different layout than your standard posts. A unique design and layout can then increase user engagement for that particular post.
In the remainder of the document add your HTML and WordPress template tags to construct your desired layout. This might utilise tags such as <?php get_header(); ?> to build the page using the existing header/sidebar/footer elements, or you might be building something completely unique using a complete WordPress loop. Don’t forget, you can also hard code features into your template file that are unique to this page, such as a contact form, YouTube video or a Google Maps iFrame.
How to Build a Template for a Custom Post Type in WordPress
By default, custom post types use the single.php template in your WordPress theme — that is, unless you create a specific template for your custom post type. You may find the regular WordPress single.php template limiting for your post type. This depends on the type of content you want to include and whether you want to apply different formats and styles for your custom post type with HTML and CSS markup.
How to Create Custom Post Template in WordPress
Once you done installing the Single Post Template plugin, you need to create a php file. This file will be used for your custom template. You can name this file anything you want. In this example we will name it customsingle.php. Don’t worry about the content of this file. You can copy the codes from your normal single.php of your template. Put this new file on your theme directory.
Unless a developer includes meta data with permalinks in their templates, the archive.php will not be used. Meta data is information tied to the post. For example the date something was posted on, the author, and any categories, tags, or taxonomies used for the post are all examples of meta data. When a visitor to a website clicks on the meta data, the archive.php will render any posts associated with that piece of meta data. For example, if a visitor clicks on the name of an author, the archive.php will display all posts by that author.