• Resolved bam999

    (@bam999)


    Is there an ability to hide the information from the recipe template but still show it to google? I want to get rid of the calories and the author info. Thanks in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter bam999

    (@bam999)

    Oh and one more question. I will ask it here to avoid the new topic. How to make a space between the instruction steps in the tastefully simple template?

    Plugin Author Brecht

    (@brechtvds)

    Hi there,

    You could create a copy of one of our templates and remove the author and calories information there: http://bootstrapped.ventures/wp-recipe-maker/create-your-own-template/

    Google doesn’t like it when you add things to the metadata that aren’t actually being displayed to the visitor, so we do recommend leaving everything in there.

    For the spacing you could add some CSS to your own custom recipe template, your theme’s style.css file or in the customizer (if you’re using WordPress 4.7):

    li.wprm-recipe-instruction {
        margin-bottom: 10px !important;
    }

    Brecht

    Thread Starter bam999

    (@bam999)

    Thanks for the quick answer, Brecht. It worked 🙂

    The last question and I am out of your hair. Now if someone rates the recipe in a comment, the stars appear above that comment, is it possible for them to appear under the comment? Thanks!

    Plugin Author Brecht

    (@brechtvds)

    You could try adding the following code to your (child) theme’s functions.php file:

    function wprm_comment_rating_stars( $text, $comment = null ) {
    	if ( null !== $comment ) {
    		$rating = intval( get_comment_meta( $comment->comment_ID, 'wprm-comment-rating', true ) );
    
    		$rating_html = '';
    		if ( $rating ) {
    			ob_start();
    			require( WPRM_DIR . 'templates/public/comment-rating.php' );
    			$rating_html = ob_get_contents();
    			ob_end_clean();
    		}
    
    		$text .= $rating_html;
    	}
    
    	return $text;
    }
    remove_filter( 'comment_text', array( 'WPRM_Comment_Rating', 'add_stars_to_comment' ), 10, 2 );
    add_filter( 'comment_text', 'wprm_comment_rating_stars', 10, 2 );

    You probably also need some CSS for spacing.

    Brecht

    Thread Starter bam999

    (@bam999)

    Thanks once again, Brecht! Everything worked 🙂

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

The topic ‘Hiding information’ is closed to new replies.