Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi Chibanga!

    There’s no way to do that, as Google+ and Facebook takes the content from the og:description meta tags. You might want to post manually to Facebook and G+ (which will likely still pull from the og:description), or, filter the og:description tags with something like this (untested but should work):

    function jp_remove_og_desc( $tags ) {
        if ( true ) {
            // Change the og:description tag added by Jetpack
            unset( $tags['og:image'] );
            $jp_og_desc = 'YOUR GENERIC DESCRIPTION';
            $tags['og:DESCRIPTION'] = esc_attr( $jp_og_desc );
        }
        return $tags;
    }
    add_filter( 'jetpack_open_graph_tags', 'jp_remove_og_desc' );

    This will change the og:description on all posts and pages as well as your home page, though. If you wanted it only on certain posts, you’d need to use WordPress conditional tags.

    Thread Starter Chibanga

    (@chibanga)

    Hi Richard,

    thank you for helping i try that but it done nothing it sends all content.

    that would be a great thing because i could put something like “visit our site…”

    it dosent matter that it changes og description on all posts because for me its only important that it puts title and link to post, like twitter does.

    Why all this… my site is about poker and i post tournaments passwords in posts and i only want that register users see that passes, but they appear on google+ and facebbok.

    Plugin Contributor Richard Archambault

    (@richardmtl)

    I’m sorry, I made a mistake in my code abov. This one should work:

    function jp_remove_og_desc( $tags ) {
    	if (true) {
    	// Change the og:description tag added by Jetpack
    	unset( $tags['og:description'] );
    	$jp_og_desc = 'YOUR GENERIC DESCRIPTION';
    	$tags['og:description'] = esc_attr( $jp_og_desc );
    	}
    	return $tags;
    }
    add_filter( 'jetpack_open_graph_tags', 'jp_remove_og_desc' );

    However, upon testing I see that you’re right, Facebook is choosing to display the actual content of the post rather than the og:description tag. I think your best bet, then, is ti password-protect your posts, or use a membership-type plugin to limit access to posts that have your tournament passwords in them.

    Thread Starter Chibanga

    (@chibanga)

    yes, not working

    i have to find a solution, i dont want my passes to be posted in facebook

    thanks again

    if you find a solution contact me

    for now im posting the post with out the pass then i repost with pass

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Publicize with no content’ is closed to new replies.