WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Coding an image link in a child theme (3 posts)

  1. nathan12343
    Member
    Posted 3 years ago #

    I'm making a child theme and want to code a link to a logo into the header. But when I use <img src="<?php bloginfo('template_directory'); ?>/img/logo.png" /> it is looking in the parent directory not the child.

    Any idea how - without hardcoding the URL - I can get to the img folder in the child theme?

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    instead:
    'template_directory'
    try and use:
    'stylesheet_directory'

  3. nathan12343
    Member
    Posted 3 years ago #

    Perfect!

    Many thanks

Topic Closed

This topic has been closed to new replies.

About this Topic