• Resolved dnhmusic

    (@dnhmusic)


    Hi there,

    I applied the settings recommended on your website to enable FB sharing :

    <meta property=”og:type” content=”article” />
    <meta property=”og:title” content=”#_NAME”/>
    <meta property=”og:url” content=”#_EVENTPAGEURL”/>
    <meta property=”og:image” content=”#_EVENTIMAGEURL”/>
    <meta property=”og:description” content=”#_EXCERPT” />

    But the title stays “Events”, the excerpt is the placeholder instead of the content, etc. Can you please help ?

    Ex : https://bit.ly/1FDr009

    Thanks in advance ??

    https://www.ads-software.com/plugins/events-made-easy/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Franky

    (@liedekef)

    Make sure you add these in the setting “Extra event html headers”, not “Extra html header”

    Thread Starter dnhmusic

    (@dnhmusic)

    Hey thanks, my bad, I put them in the “Extra HTML Header”.

    FYI, I also had to disable Facebook’s official WP plugin as it was clashing on the og meta tags.

    Thread Starter dnhmusic

    (@dnhmusic)

    Dear Franky,

    AddToAny isn’t playing along anymore (nor is Social Floating Bar) , even with the modified HTML headers… please help ??

    Plugin Author Franky

    (@liedekef)

    Apparently it works with AddToAny floating buttons, but no longer with the regular. You should ask AddToAny why this is happening …

    Thread Starter dnhmusic

    (@dnhmusic)

    OK I’ll check with them, it is a pretty strange behavior.

    On the topic of OG tags, to share, here’s the code I used to disable Yoast SEO for events page :

    function remove_yoast() {
    	wp_reset_query();
    	global $wpseo_front;
    	if (is_page(1340)){
    	if(defined($wpseo_front)){
    		remove_action('wp_head',array($wpseo_front,'head'),1);
    	}
    	else {
    		$wp_thing = WPSEO_Frontend::get_instance();
    		remove_action('wp_head',array($wp_thing,'head'),1);
    	}
    	remove_action('wp_head','rel_canonical');
    	remove_action('wp_head','index_rel_link');
    	remove_action('wp_head','start_post_rel_link');
    	remove_action('wp_head','adjacent_posts_rel_link_wp_head');
    	}
    }
    
    add_action('wp','remove_yoast');
    Thread Starter dnhmusic

    (@dnhmusic)

    Franky,

    To share, here’s the response A2A’s support gave me :

    The floating buttons use the current URL, and the default standard buttons use the post URL via WordPress’ get_permalink().

    You should look into having the Events Made Easy plugin adjust the post URLs provided by get_permalink().

    Otherwise, you can disable the default standard buttons and manually place some buttons code into your theme so that the buttons share the current URL. See the plugin FAQ for PHP template code you might use to share the current URL. For example:

    <?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) {
        ADDTOANY_SHARE_SAVE_KIT( array( 'use_current_page' => true ) );
    } ?>

    And here’s how I put it in place on my website running with Thesis 1.8.6:

    custom_functions.php

    function addtoany_current_url (){
    	?><div id="addToAny_custom"><?php
    	wp_reset_query();
    	if (is_page(1340)){
    		if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) {
    			ADDTOANY_SHARE_SAVE_KIT( array( 'use_current_page' => true ) );
    		}
    	}
    	else{
    		if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) {
    			ADDTOANY_SHARE_SAVE_KIT( array( 'use_current_page' => false ) );
    		}
    	}
    	?></div><?php
    }
    
    	add_action('thesis_hook_before_post','addtoany_current_url');

    custom.css

    #addToAny_custom {text-align: center; padding-bottom : 1.5em;}

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Facebook sharing & Meta tags’ is closed to new replies.