Hooks. actions, functions etc.
Hi there,
I've been trying to get my head around the hooks, actions, functions etc and how to edit them when using a child theme in Vantage but still struggling somewhat. As you can tell I'm new to php and although I've read the various tutorials suggested on this forum, I'm not getting very far!
I've worked out how to modify the template files in the root of the child theme and get them working, but when it comes to the files within the sub-folders such as images / includes / framework etc. I hit a brick wall.
There are several changes I want to make but If I just give one example here, perhaps I can use the solution provided to get my head around everything better/
Increasing the excerpt length on category pages
From what I can tell, I would need to change the following:
This line of code on content-listing.php:
<p class="listing-description"><strong><?php _e( '', APP_TD ); ?></strong> <?php the_excerpt(); ?> <?php echo html_link( get_permalink(), __( 'Read more...', APP_TD ) ); ?></p>
And add a new function to functions.php which includes this code:
function custom_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
Am I sort of along the right lines?