• I am slowly getting more comfortable with dealing with code here and there and inserting snippets. Unfortunately, unless someone tells me exactly what to put in there, I do not what exactly I should edit in the code to make it do what I want.

    So when someone shares a snippet or we find one on a site, how do we know what should change. Does the color of the code indicate what should be changed? (does green mean customize?) Are there symbols I should pay attention to? Here is an example of something I am trying to do, but not sure what I should change here. Heres the snippet

    What way can you tell what should be changed and what shouldnt change when you dont have color, like here:

    add_filter('tc_category_archive_title' , 'my_cat_title');
    function my_cat_title($title) {
        return 'My archives title for : ';
    }

    I know this is amateur hour:( Thanks for taking the time!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    The colour doesn’t indicate anything like that, it’s more to look pretty and help you understand the code from a developer’s perspective.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    In that example when it says for you to paste it into your functions.php file, it means just right at the very bottom of the file add that code.

    If your (child theme) functions.php file has this characters at the very bottom:

    ?>

    Then make a new line just above those characters and put the code there.

    Thread Starter rotoblueprint

    (@rotoblueprint)

    Thanks Andrew…I have at least gotten that far. I know where to put it and how to add to my child theme BUT for this example, I am trying to change the title of categories.

    Right now, if you go to know of my categories it will say “Category Archives: Then the Category’s Name.” I want to get rid of the “Category Archives” and have it simply state the name of the category.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You should continue these queries on that thread you made about the Category titles. Isn’t this entire thread regarding Customizr?

    Thread Starter rotoblueprint

    (@rotoblueprint)

    I hear ya, but my question is more general. My hope is to not have to post every single time I run into a snippet. This is merely the example I am working through right now.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    There is no generic answer that we can give you to answer this:

    So when someone shares a snippet or we find one on a site, how do we know what should change. Does the color of the code indicate what should be changed? (does green mean customize?) Are there symbols I should pay attention to?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Color meanings in code’ is closed to new replies.