The WordPress has a very complete Template Hierarchy. For more detailed explanation, visit this article: https://developer.wordpress.org/themes/basics/template-hierarchy/
Basically, to define the layout for this post-type, you can create a file in the theme directory named: single-{post-type}.php
In your example: single-happypost.php
Cheers!
Related Posts:
- Sizing screenshot.png without losing aspect ratio
- How Do I Protect My Premium WordPress App Theme from Copying?
- When to use _e and __ for the translation?
- Get entered value of customiser field for live preview
- Add default Backgrounds
- Page template in two level deep folder
- How to Include SVG sprites icons into the body tag? [closed]
- Why doesn’t /2013/01/ properly return January’s archives in archive.php?
- Worthwhile to restrict direct access of theme files?
- Excess White Space Above Admin Bar on Frontend Using Twitter Bootstrap
- Child Theme not loading parent CSS
- Use of undefined constant FS_CHMOD_DIR – assumed ‘FS_CHMOD_DIR’
- WordPress settings API error when checkbox unchecked
- How the WordPress sidebar works
- How to remove header images from all pages except the home page? skeleton theme
- Replace Home with image link inside custom header menu
- Separated Comment from Post
- WordPress website loads but is not displayed until page scrolled
- wp_head() not inserting the default stylesheet style.css
- Theme Customizer not loading
- WordPress Customizer Control with React
- Theme Options page not showing up in admin menu
- File Security Check in wordpress in index.php of theme
- Force index.php have_posts() loop to exit if no sticky posts found
- Is my approach to enqueue styles inefficient?
- How do the default themes reference style.css?
- Input ordering in wordpress theme customizer
- Customize the previous_post_link output
- Which file handles the block latest posts, I want to examine excerpt handling
- Menu item added in wp_nav_menu_items filter is never highlighted
- Single page site with history.js
- Not able to select width of blocks inside of cover block
- How do i make a custom section’s setting display the default value in Customizer?
- Warning: A non-numeric value encountered in theme functions.php
- In this snippet how do I force the function to use gravatar rated G and fill in the alt for get_avatar()?
- “Add A Widget” button in the Customizer
- Responsive Images – crop don’t seem to work
- Set parent theme language with custom .mo files
- WooCommerce: multiple input field for multiple product variations
- Change template if tag selected
- Where WordPress Stores The Custom Fields Values
- How to unset a set query variable?
- Theming Using Bootstrap Glyphicons and WordPress Dashicons
- Overide enqueue in non plugable function via child theme
- Overrride buddypress theme function [closed]
- Custom Post Type Query issue
- WP_editor doesnt apply wpautop on single line content
- Starting point for custom Themes [closed]
- How to order by multiple date meta_values?
- How to reverse engineer the Twenty Eleven background image uploader?
- Which cache is kicking
- How do I merge 2 WordPress Themes?
- Place title (in correct place) above image with opaque background [closed]
- Fastest way to update a theme
- Load different single.php templates according to post layout selection
- Full width featured thumbnail
- Is there a way to switch to another theme?
- Right procedure when you develop a WP Website for a client
- Different themes on one site
- // File Security Check from WooCommerce [duplicate]
- Allow different tags in widget titles
- How do I implement jPanelMenu?
- When trying to set title, not sure how to edit it for different pages
- Site returns a 500 Internal server error
- Switch theme if ie compatibility/quirks mode?
- Pagination and multiple loops
- Changing background color depending on parent page?
- Any way to change/add to the theme name dynamically?
- Available widgets is not showing up?
- Getting white screen of death on category pages because of body_class() function
- Alter shop page lay-out in OceanWP theme
- WordPress link to another page in site does not render a
- How to add an import widgets functionality to wordpress themes without a plugin
- Developing WordPress site behind a static site
- Problem with Displaying Custom Theme Page’s Content
- Code showing in wordpress post titles around website
- Change site title color on individual pages
- Git ignore everything except custom theme directory
- HTML to → WP Conversion
- Add multiple sections, settings and controls at once to the Customizer
- Font not loading [closed]
- How to change parent permalink?
- Adding a Class to an Getting From Post Content
- Editable screenshot.png in a custom theme developed
- How to create multiple pages in a client theme?
- How to share posts (and plugins) between existing site and new, separate dev/test installation?
- get_theme_mod not pulling css colors into header using wp_head
- Duplicate WordPress site to subdirectory but use same db?
- Menu order of parent menu from perspective of child menu
- Conditional loop based on current page
- Theme customizer live preview JS- Trying to bind to an html image url without luck
- wp_deregister_script was called incorrectly
- Undefined index: debuging error for theme option template snippet
- Bestway to write php functions
- custom theme’s search not working
- Permalinks problem with custom theme
- Purchased Theme to Custom Made Theme? [closed]
- Feeds are showing where Post archive page should be
- WordPress Two Level Filters on Getting Custom Taxonomy Terms
- I want to resize post featured image without cropping image. How?