Site logo

[Resolved] Custom post type not loading CSS

Home Forums Support [Resolved] Custom post type not loading CSS

Home Forums Support Custom post type not loading CSS

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2275631
    Matic

    Hello,

    I am using the provided Child theme for Generatepress and style.css within it to edit my website.

    I defined a new custom post template by copying copying the content-single.php and adding the following code to the top of the template:

    /**
     * The template for displaying single posts.
     * 
     * Template Name: Full Width Post
     * Template Post Type: post
     *
     * @package GeneratePress
     */

    It shows in the template options as expected. So far so good.

    However, when using this new template, it doesn’t load ANY css, fonts, or JS.

    Is there a crucial mistake I’m doing? Do I have to enqueue every script and stylesheet for this post template separately?

    #2275673
    Matic

    For anyone with the same problem: You’re supposed to duplicate both single.php and the content-single.php and edit them appropriately.

    More info here: https://generatepress.com/forums/topic/creating-a-custom-page-template/#post-1875566

    #2275688
    Fernando
    Customer Support

    Glad you were able to resolve the issue!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.