Frontier Child Theme functions.php problem (thumbnail size)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #4700

    Hello and thanks for providing the Frontier Child Theme download but I must be doing something wrong. When trying to change the featured image thumbnail size I enter the below text in the child theme functions.php file but nothing happens, the theme still defaults to the thumbnail setting in the original themes functions.php file. Is there something else I need to add to the below text? Thanks!

    // Your code goes here.
    add_image_size( 'thumb-738x400', 738, 400, true );

    The code you’ve added only instructs WordPress to add a new size whenever an image is uploaded. You’ll need 2 functions, one to add the new image size and another to get the theme to use the new image size for the thumbnails on the excerpts.

    Add new image size

    function frontier_new_image_size() {
    	add_image_size( 'thumb-738×400', 738, 400, true );
    add_action( 'after_setup_theme', 'frontier_new_image_size' );

    Use the new image size

    function frontier_change_thumbnail_size() {
    	return get_the_post_thumbnail( get_the_ID(), 'thumb-738×400' );
    add_filter( 'frontier_excerpt_thumbnail', 'frontier_change_thumbnail_size' );

    Note: Adding a new image size through the function add_image_size will only affect newly uploaded images. You could use a plugin like this ( regenerate thumbnails ) to process old images. You can deactivate/delete when done.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Frontier’ is closed to new topics and replies.