Directory Locations for Child Themes

  • Chris

    #7091

    Hey, I have two quick questions about the child theme.

    If I create a function in the child theme’s functions.php file, and I refer to another file in the child theme’s directory, would I use the same thing as with a regular child theme?

    For example: Would using the function to call the current theme’s directory work, or should I place any files and images in the mobile theme directory itself, and just use an absolute URL reference to the file or images location?

    Pretty much the same question with the child stylesheet. If I have an images directory in the child directory, would I use the same relative URL to point to it as in a regular child theme? Like, url(images/logo.png), etc.

    I may have to give the mobile neo theme a shot if it’s capable of adding a header logo. It looks like the neo theme is just more elegant, but is it really worth the upgrade? I’m thinking $15 may be the most time saving option than having to do so many customizations on the on the regular theme.

    Thanks again!

    Admin

    Syahir Hakim

    #36940
    Quote:
    If I create a function in the child theme’s functions.php file, and I refer to another file in the child theme’s directory, would I use the same thing as with a regular child theme?

    PHP works the same way regardless of in what folder it is located. So if you have the following files in your child theme’s folder:

    wp-content/uploads/graphene-mobile-custom/
    -- style.css
    -- functions.php
    -- custom-file.php

    In order to load or reference the custom-file.php from functions.php, you can just use relative file path like this:

    include( 'custom-file.php' );

    That will mostly work. If it doesn’t (perhaps due to the PHP configuration), then you will have to use absolute path instead of relative path.

    Quote:
    I may have to give the mobile neo theme a shot if it’s capable of adding a header logo. It looks like the neo theme is just more elegant, but is it really worth the upgrade? I’m thinking $15 may be the most time saving option than having to do so many customizations on the on the regular theme.

    That’s up for you to decide. Part of the reason why Graphene Mobile Neo is priced higher is because of the higher costs involved in bringing the premium design to the theme, alongside the other additional features that Graphene Mobile doesn’t have. However, you can get a feel of the theme before purchasing it by making use of the theme’s demo site. Remember that you also have a no-question-asked 7-day money back guarantee, so you can use that as a “free” trial period too.

Viewing 2 posts - 1 through 2 (of 2 total)

  • You must be logged in to reply to this topic.
Do NOT follow this link or you will be banned from the site!