New Landing How can we help? Cardinal Child Theme and sf-header.php

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Cardinal
  • #90305
    Pothe
    Member
    Post count: 336

    Hi,
    I want to put the contact header feature next to the shopping cart for header option 2.

    I know this is outside theme support so any tips would be great:

    Do I add the file sf-header.php to the child theme with just the lines I want to edit?

    Thanks

    #90427
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi Andrew,

    No – that only works with template files, not files which contain functions.

    What you’d want to do is copy down the sf_header() function to your child theme, then make your edits there. That function will then be used ahead of the parent theme function.

    Hope that helps.

    – Ed

    #90697
    Pothe
    Member
    Post count: 336

    Hi Ed,
    Thanks for the help on this.
    Do you mean I need to copy the entire sf_header.php file to the child theme function.php or add the sf_header.php to the child theme directory?

    #90761
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Basically, you need to open sf-header.php, go to line 161 and copy the whole function starting with:

    if (!function_exists('sf_header')) {

    right down to line 385. Then paste this in your child theme’s functions.php file

    – Kyle

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

You must be logged in to reply to this topic.