Farms Theme Pack: PrimePress Child theme

Hi guys,
I am trying to make a child theme for one of the themes in the Farms pack, its called PrimePress.
I have read the article on Wordpress.org http://codex.wordpress.org/Child_Themes but I need some help with the functions inside of the functions.php file.
The theme seems to automatically rotate it's header image, but there doesn't seem to be an option to use a single image in the header area, what function could I use to replace the themes default
rotating header images with one of my own.
also I would like to remove the links in the footer.php, wold you mind also sharing what function I would use to do this as well.
Thanks a ton.

  • 3SixtyEvolve

    Hi Jeremy @jeremyyoung

    Welcome to WPMU DEV and thank you for being a member of our Community.

    It took some digging and the help of one of our developers, but I think I got the solution for you.

    Firstly, as part of the theme there is a folder /headers/ which contains the images. Easy solution would be to remove all the image, but the one you would like to show.

    There is also the option of changing the image via the WordPress Admin Panel under Appearances » Header.

    For the footer link, just remove this part from the functions.php:
    check_theme_footer();
    This would remove any links in the footer.

    Let me know if this solves it for you.

    I look forward to hear from you and wish you all the best in setting up your child theme website.

    Have a good day!

    Gina

  • jeremyyoung

    Hi Gina,
    thanks for the reply.
    I kinda don't like the idea of editing the main theme files, I thought any edits I made would be overridden if there were ever updates to the theme, and being a clients site on a Multisite install that could become a little messy, forgive me if I am mistaken.
    My intention is to create a single child theme for every client, that way every site can have it's own distinct modifications without ever affecting the parent theme files.
    For example, someone might actually want the rotating images at some stage in the future.

    What I had in mind was something like http://codex.wordpress.org/Function_Reference/add_custom_image_header but I am unsure if this will work specifically for PrimePress.

    There is also the option of changing the image via the WordPress Admin Panel under Appearances » Header.

    There doesn't seem to be the header option in my version of the theme.

    Would you mind checking with the devs and ask if the following code would work straight out of the box, so to speak, I got this from the link above, all I have done is swapped out this line of code...

    define('HEADER_IMAGE', '%s/images/default_header.jpg'); // %s is the template dir uri

    with

    define('HEADER_IMAGE', trailingslashit( get_stylesheet_directory_uri() ).'images/banner.jpg');

    Do I just paste the following code straight into my functions.php file of my child theme?

    define('HEADER_TEXTCOLOR', 'ffffff');
    define('HEADER_IMAGE', trailingslashit( get_stylesheet_directory_uri() ).'images/banner.jpg'); // %s is the template dir uri
    define('HEADER_IMAGE_WIDTH', 775); // use width and height appropriate for your theme
    define('HEADER_IMAGE_HEIGHT', 200);
    
    // gets included in the site header
    function header_style() {
        ?><style type="text/css">
            #header {
                background: url(<?php header_image(); ?>);
            }
        </style><?php
    }
    
    // gets included in the admin header
    function admin_header_style() {
        ?><style type="text/css">
            #headimg {
                width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
                height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
                background: no-repeat;
            }
        </style><?php
    }

    thanks
    J

  • aecnu

    Greetings jeremyyoung,

    Sorry for the delay here in a response, our developer in charge of this package was out of the game for a little while with a fried Motherboard and therefore was unreachable except for an email from him telling the situation.

    He is now up and running again therefore I am going to ping him in here to offer his advice/advise us of what he thinks of your code above.

    Though this may take longer then a normal ticket, we look forward to possibly getting this resolved with the developers experienced help in the matter.

    Cheers, Joe

  • 3SixtyEvolve

    Hi Jeremy

    Hope you're well.

    While we wait for a new developer to be appointed to this theme, would you be able to provide me with a link of your site? I would like to have a look at the current code to see where you can make these changes in your current theme and WordPress install setup.

    I can try to assist, as far as possible :slight_smile:

    Have a good day and look forward to receive your feedback.

    Gina

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.