Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter phoenixsa07

    (@phoenixsa07)

    Hi!

    I have inserted your code in mine:

    //* Add featured image on single post
    add_action( 'genesis_entry_content', 'maker_featured_image', 1 );
    function maker_featured_image() {
    
    	$add_single_image = get_theme_mod( 'maker_single_image_setting', true );
    
    	$image = genesis_get_image( array(
    			'format'  => 'html',
    			'size'    => 'featured-image-large',
    			'context' => '',
    			'attr'    => array ( 'alt' => the_title_attribute( 'echo=0' ), 'class' => 'aligncenter' ),
    		) );
    
    	if ( is_singular() && ( true === $add_single_image ) ) {
    		if ( $image ) {
    			printf( '<div class="featured-image">%s<div class="featured-image-credits">'<?php echo do_shortcode( '[caption id="'.get_post_thumbnail_id( $post->ID ).'"]<p>%author%</p>[/caption]' ); ?>'</div></div>', $image ); 
    		}
    	}
    }

    then the following message appears:

    Parse error: syntax error, unexpected ‘?’ in /www/htdocs/w00a8160/gesundheitsrebell_de/wp-content/themes/maker-pro/functions.php on line 281

    Thread Starter phoenixsa07

    (@phoenixsa07)

    Hi,
    thank you so much for your quick reply!
    I tried it with this code, but unfortunately a white page with an error message appears …. Can it be related to the fact that I use a Genesis Theme? or is not your code so easy to install in my above?

    Thank you!!!

Viewing 2 replies - 1 through 2 (of 2 total)