So close…functions.php…just a little more help
-
I have spent about 2 days reading with about 12 hours of video trying to get my child theme up and rolling. I havent done TON of tinkering, but I am getting much more comfortable.
Here is my main hurdle right now (please feel free to link to a previous discussion because I sense Im not the first with this exact issue:
-I cant get the snippets I put in functions.php to work.
-I have tried several different methods, but clearly there is something wrong with the way I am starting. I either get a white screen and shut down my site OR I see the text from the code at the top of my site with no actual changes having had taken place.What Ive done so far (again this probably sounds silly the way I am saying it because of my noob status:
-created a child theme through Bluehost’s c-panel
-style.css is good to go
-I have tried to upload the functions.php starting with:<?php
/**
* My Custom Functions
*/but nothing I put in below seems to take.
I realize I have a lot to learn and you probably dont know where to start, so definitely not asking for you to teach me anything, but is there a resource you would recommend to help me get started on having a better understanding of what’s going wrong? This is the code I am trying to use at the moment, btw:
add_filter(‘tc_fp_link_url’ , ‘my_custom_fp_links’, 10 ,2);
function my_custom_fp_links( $original_link , $fp_id ) {//assigns a custom link by page id
$custom_link = array(
//page id => ‘Custom link’
2 => ‘https://www.rotoblueprint.com/?cat=5’,
9 => ‘https://www.rotoblueprint.com/?cat=7’
);foreach ($custom_link as $page_id => $link) {
if ( get_permalink($page_id) == $original_link )
return $link;
}//if no custom title is defined for the current page id, return original
return $original_link;
}add_filter(‘tc_category_archive_title’ , ‘my_cat_title’);
function my_cat_title($title) {
return ‘My archives title for : ‘;
}
- The topic ‘So close…functions.php…just a little more help’ is closed to new replies.