• Resolved roxer82

    (@roxer82)


    Hello. I need to make changes in the featured image because they are too small and Google take them as warnings.
    And, I use “Multiple Featured Images” plugin, so, I replace that for the featured one. In amp-helper-functions.php I use:

    If(kdmfi_has_featured_image('featured-image-2', $post->ID)){
    	$imgfb = kdmfi_get_featured_image_src( 'featured-image-2', 'full', $post->ID );
    	$post_image_meta = array(
    		'@type'  => 'ImageObject',
    		'url'    => $imgfb,
    		'width'  => '657',
    		'height' => '340',
    	);
    }else{
    	$imgfb = "staticURL.jpg";
    	$post_image_meta = array(
    		'@type'  => 'ImageObject',
    		'url'    => $imgfb,
    		'width'  => '657',
    		'height' => '340',
    	);
    }
    
    return $post_image_meta;

    Is there any way to change this code in another place in my theme_floder\AMP so that I don’t loose it every time amp plugin is updated.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Changing “amp-helper-functions.php” without losing changes’ is closed to new replies.