• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Is singular.php not working in Genesis?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Is singular.php not working in Genesis?

This topic is: not resolved

Tagged: page.php, single_template, single.php, singular.php, template_include

  • This topic has 1 reply, 2 voices, and was last updated 4 years, 10 months ago by Brad Dalton.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • July 30, 2018 at 2:34 am #222100
    Andrea Barghigiani
    Member

    Hi all,
    I am a bit confused about how single view is working on Genesis.

    Looking at the Template Hierarchy if I want to modify both the single article view and the single page view I could use a file named singular.php.

    Well I've tried it but is not working in Genesis.

    I've searched around but I did not find any simple solution to it.

    I understand that WordPress does not load this file because it finds the single.php file in the parent theme and is not a big issue to create this file in my child theme instead of the more general one singular.php.

    Anyway I would like to know if any of you have found a solution about it because I think this is the right approach since it follows the WordPress Rulez.

    Thank you in advance,
    Andrea


    SkillsAndMore: the italian go to resource for web development.

    July 30, 2018 at 5:17 am #222105
    Brad Dalton
    Participant

    singular.php will not override page.php because of the Hierarchy https://developer.wordpress.org/themes/basics/template-hierarchy/#single-page

    Use :

    single.php for posts.

    and

    page.php for single pages.

    Otherwise you could use a template_include filter to load the same file on single posts and pages but it's not as efficient.

    Another option is to use the single_template filter.

    Or, you can use 1 page template for any post type using a header like this :

    // Template Name: Any Post Type Template
    // Template Post Type: post, page, portfolio
    

    And name the file anything you like.


    Tutorials for StudioPress Themes & WooCommerce.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble