Black Friday Sale! Get $20 off GP Premium, $40 off our new Lifetime license, and 45% off license renewals/extensions! Learn more

[Support request] get_template_directory_uri of child-theme links to main-theme

Home Forums Support get_template_directory_uri of child-theme links to main-theme

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #440015

    Hi Tom

    After working several weeks with your theme I’m still totally convinced that I made the right decission to buy GeneratePress.

    But now I’m struggeling the first time with the child-theme you are offering. I tried to add some PHP-Code to the childs function.php and I tried to load some own additional css with this function:

    add_action( ‘wp_enqueue_scripts’, ‘enqueue_my_styles’ );
    function enqueue_my_styles() {
    wp_enqueue_style( ‘fontello’, get_template_directory_uri().’/fontello-ee6ff678/css/fontello.css’,false,’1.0′);

    unfortunatelly it seems like get_template_directory_uri() doesn’t point to the right theme-folder – in HTML-Code I got this result:
    <link rel=’stylesheet’ id=’fontello-css’
    type=’text/css’ media=’all’ />

    although it should load from …/themes/generatepress-child/…

    any idea?
    -> I googled arround a bit and I just wondered about the separate
    child-theme-folder – WordPress told me today, that I’m not useing a
    child-theme… I found out, that the proper way of creating a
    child-theme is to create a “child” folder underneath the
    main-theme-folder… did this change in last recent versions?

    GP Premium 1.5.5
    Lead Developer
    Lead Developer

    Hi there,

    get_template_directory_uri() points to the parent theme folder.

    You want to use get_stylesheet_directory_uri() instead.

    Let me know 🙂

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