Child theme question for SOCIAL theme

I'd like to make some modifications to Social. Specifically:

when you go to a category archive:

http://lamsocialclub.com/category/articles/

- I'd like to only show the publish date if the post is not an Event category post.

- I'd like to add a shortcode so that if you're logged in, you see the text

- make modification to the header navigation

- and a few others

My question is, do I just copy the files from the parent theme that I'm going to modify and put it in the child theme folder with the same hierarchy? Is that enough?

Do I create a new functions.php file for the new functions or copy the functions.php file from the parent theme, and add the functions to that file?

Thank you,
Giovanni

  • Giovanni

    For example.

    I wanted to change the way the excerpt is displayed. I put the function file in the child theme with the modified function and I get the following:

    And I get the following error:

    [07-Jul-2012 18:34:41] PHP Fatal error: Cannot redeclare custom_the_excerpt() (previously declared in /home3/latinos3/public_html/lamsocialclub/wp-content/themes/bp-social-child/functions.php:5) in /home3/latinos3/public_html/lamsocialclub/wp-content/themes/bp-social/functions.php on line 609

    What should be done?

  • aecnu

    Greetings Giovanni,

    Thank you for these questions.

    My question is, do I just copy the files from the parent theme that I'm going to modify and put it in the child theme folder with the same hierarchy? Is that enough?

    To the best of my knowledge and to date this has always worked for me except for the functions.php file though I admit I have not tried every file within a theme to see if this works for them all. But the ones I have copied with the exception of the functions.php file have worked without error.

    Do I create a new functions.php file for the new functions or copy the functions.php file from the parent theme, and add the functions to that file?

    My experience to date, the child theme normally already contains what is basically an empty functions.php file in which you would want to add your modifications.
    If it is absent then I think you should go ahead and create one, not copy, because everytime I have tried this I got several various errors, but when just adding my modifications directly it worked.

    Your second post i believe was answered immediately above.

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.