Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #14161

    I had more questions earlier but managed to answer most of them by hunting through the forums. I have a handful I haven’t been able to work through and would greatly appreciate any help with the following:

    1. I have created a child theme with style.css in it. So do I modify css with the style.css in the child theme, or with custom.css in the parent theme, or with custom.css in the child theme?

    2. If I want to modify something from the includes folder, for example loop-page.php, do I need to make a folder in the child theme named ‘includes’ and place the file in the folder? Or do I just add the file to the child theme?

    3. Where are custom templates saved? I’d like to be able to have backups for when I mess something up and have to reinstall wordpress and the theme….

    4. I want the sidebar to be narrower than it is. I have accomplished this by modifying functions.php to have nine units for content and three for sidebar but have been unsuccesful in putting functions.php into the child theme. I followed the instructions on codex.wordpress.com but it didn’t override the function in the parent functions.php and I don’t know what to do with the following:

    if (!function_exists(‘theme_special_nav’)) {

    function theme_special_nav() {

    // Do something.

    }

    }

    Also, if I go by the instructions written in the functions.php file, what other files and folders do I need in the child theme to make it work? I tried uploading the framework folder and functions-choices.php, but this made the theme options disappear from the backend and gave me an error on the frontend about line 5 on header.

    From functions.php

    /*

    * if you run a child theme and dont want to load the default functions.php file

    * set the global var bellow in you childthemes function.php to true:

    *

    * example: global $avia_config; $avia_config = true;

    * The default functions.php file will then no longer be loaded. You need to make sure than

    * of course to include framework and functions that you want to use by yourself.

    *

    * This is only recommended for advanced users

    */

    5. Where’s my tagline??? Why no text logo? :o( How to combine the advice found at http://www.kriesi.at/support/topic/putting-tagline-beside-logo (for tagline) with that found at http://www.kriesi.at/support/topic/logo-as-text (for text logo)?

    Thanks! :)

    #82319

    Hi janinelr,

    What theme is this for? I’ll try and give some general answers but I may need to be vague.

    1.You’ll need to make all your changes in the child themes style.css.

    2. Yes, you need to re-create everything in the child theme folders exactly as it is in the parent to overload it. Check the theme files for the specific file and Kriesi often includes comments for child themes.

    3. I believe they are saved in a variable/entry in the wp database but I’ll need to refer the question to either Kriesi or Peter for anything more specific.

    4. See Kriesi’s answer below

    5. It should just be a matter of changing the header.php file. You may also need to adjust the layout a bit with some css modifications but without seeing your site and what you have now there is no way to say for sure.

    Regards,

    Devin

    #82320

    Hi Devin! I’m using the Choices theme… meant to say that, sorry! Thanks for letting me know re. 1 and 2. I would still to know about #3, and related to that I’d also like to know if changes made in Theme Options such as headers and colors and fonts are stored somewhere, so I can have just-in-case backups of them. #5 I solved by following the info in some other posts here in the forums and replacing “echo avia_logo(AVIA_BASE_URL.’images/layout/logo.png’);” in header.php with the following and then styling it:

    echo avia_logo();

    ?>

    <h1 id=’tagline’>

    <?php echo bloginfo(‘description’); ?>

    </h1>

    <?php

    Still no luck with making functions.php work in the child theme,though. I put the functions folder in the child theme and changed the child theme’s functions.php to read:

    <?php

    global $avia_config;

    $avia_config = true;

    Still not able to make it work. The error I get (on the frontend only, the backend works fine) is:

    Fatal error: Call to undefined function avia_get_option() in /home/furryleg/public_html/wp-content/themes/choices-child/header.php on line 5

    Line 5 of the header is:

    $responsive = avia_get_option(‘responsive_layout’,'responsive’);

    I tried copying over all of the files and folders from the parent theme so I could delete them one by one and see which file/s were needed, and got that same error, even with the entire parent theme copied over to the child theme. All I really want this for right now is to change the content and sidebar widths from eight and four units to nine and three, so it’s probably easier to just change that in the parent theme, but it’s bugging me that I can’t get it to work and as I learn more about wordpress, I may want to add more functions or edit the existing ones. It seems like there is something small and obvious that I am just not doing right.

    Janine

    #82321

    Hi Janine,

    I’ll have to check with Kriesi on if there is anything else specific with Choices as its the newest theme and I have not gotten a chance to really dive into completely.

    Regards,

    Devin

    #82322

    @3: the dynamic pages are saved in:

    the options table of wordpress:

    “avia_options_choices_dynamic_pages” (defines the pages)

    “avia_options_choices_dynamic_elements” (defines the elements for those pages)

    all other options like theme colors etc are stored in “avia_options_choices”

    as for setting the layout in the childs functions.php: simply add this function:


    function avia_set_units(){
    global $avia_config;

    $avia_config = array('content' => 'twelve alpha', 'sidebar' => 'hidden', 'meta' => 'one alpha', 'entry' => 'eleven');
    $avia_config = array('content' => 'nine', 'sidebar' => 'three alpha' ,'meta' => 'one alpha', 'entry' => 'seven');
    $avia_config = array('content' => 'nine alpha', 'sidebar' => 'three', 'meta' => 'one alpha', 'entry' => 'seven');

    }

    add_action('init', 'avia_set_units');

    Hope this helps. I have also marked the rest of the team so they can pass this knowledge if the question about overwriting options in the function.php file of a child theme occurs ;)

    Cheers!

    Kriesi

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

The topic ‘child theme, custom templates, and functions oh my!’ is closed to new replies.