• Resolved Naked Life Coach

    (@naked-life-coach)


    Help please… I made a child theme using Child Themify as described here: https://www.themesandco.com/snippet/creating-child-theme-customizr/

    And what I’m trying to do is to remove the category, tags, etc. from appearing on my blog category and post pages as described here: https://www.themesandco.com/snippet/remove-categories-and-tags-buttons-in-the-post-metas-block/

    I have 2 questions:

    1. The instructions in the child theme post are unclear to me. Do I need to create and upload a new functions.php file? It says the best way to modify the Customizr child theme is by using hooks and classes, but I don’t know how to do that either. Should I just duplicate the functions.php file and add it into my child theme’s folder via FTP?

    2. IF copying and uploading a functions.php file via FTP: Do I just copy and paste this code snippet and then make all changes, or would the snippet need to be modified/custom written for each change? The code snippet I am referring to is located on the child theme instruction page under the heading Pluggable and is this

    if( ! function_exists(‘name_of_function’) ) {
    function name_of_function( $params ) {
    // do some stuff with the $params }
    }

    3. Does anyone know a code snippet to stop displaying the share buttons on the category pages? Those should show up only on each individual blog post, rather than after each post when someone is looking at the entire category.

    My website sections I want to modify are all the category pages such as this: https://www.thenakedlifecoach.com/category/news

Viewing 2 replies - 1 through 2 (of 2 total)
  • 1 & 2) I’m not sure of how that plugin produces the theme files, but this snippet explains how to do it manually. You should end up with a child theme directory with 2 files – style.css and functions.php.

    The functions.php should NOT be a copy of your core file, it is the one exception for changing core files in the child theme. It just needs to have <?php on line 1. The rest of the code you add are filters which make incremental changes to the core code. You’ll find these changes documented throughout the php snippets. Mostly it’s a straight cut&paste but some do need you to change url’s for example.

    You will need to FTP to your host when ready.

    3) Not sure what you mean by share buttons? Maybe you mean this snippet

    Thread Starter Naked Life Coach

    (@naked-life-coach)

    Ah. Thank you for clarifying that. I’ve now pared down the child functions.php file to just that line and the code snippets. Lighter code! Yay!

    As for #3 – it was actually a setting in my plugin to display the share buttons and somehow all the options were checked so I just had to uncheck the options and limit it’s display to posts and pages only. However, I have been trying to get that snippet you referred to to work as well.

    Thanks again ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Modifying functions in a Customizr child theme’ is closed to new replies.