Theme not using functions.php?
-
Hello!
I’m editing my functions.php page, and it does not seem to be running the code that I’ve pasted into the bottom of it:
function my_home_category( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
$query->set( ‘cat’, ‘3’);
}
}
add_action( ‘pre_get_posts’, ‘my_home_category’ );I’m trying to show only one category post on the home page, category id 3. Any suggestions?
thanks!
Jacob
- The topic ‘Theme not using functions.php?’ is closed to new replies.