Skip to content

Instantly share code, notes, and snippets.

@geraldotech
Created May 30, 2026 19:03
Show Gist options
  • Select an option

  • Save geraldotech/df594e4fc69a1cf4f805373d5408acbe to your computer and use it in GitHub Desktop.

Select an option

Save geraldotech/df594e4fc69a1cf4f805373d5408acbe to your computer and use it in GitHub Desktop.
wordpress custom template example
<?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