Created
May 30, 2026 19:03
-
-
Save geraldotech/df594e4fc69a1cf4f805373d5408acbe to your computer and use it in GitHub Desktop.
wordpress custom template example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| *Template Name: Your Custom Layout | |
| * Template Post Type: post | |
| * The template for displaying all single posts | |
| * | |
| * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post | |
| * | |
| * @package Blocksy | |
| */ | |
| get_header(); | |
| if ( | |
| ! function_exists('elementor_theme_do_location') | |
| || | |
| ! elementor_theme_do_location('single') | |
| ) { | |
| echo '<h1>hello from my custom template for single posts</h1>'; | |
| get_template_part('template-parts/single'); | |
| } | |
| get_footer(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment