Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1314418

    Hi there

    I use Enfold (a child theme) and have done for many years. I have the absolutely latest version. I am very happy with that. I also have the latest version of WordPress and PHP:

    My problem is that I can’t find an Open Graph plug-in that is stable when it comes to adding the featured image to a normal post on Facebook. That is actually all I want from an Open Graph plug-in. All the fancy elements with adding everything else is out of my interest, and I do not want to use a SEO plug-in just to get that image on my Facebook posts. For the moment I have no interest in a SEO plug-in. It might come later on.

    I have tried “OG” and “Open Graphite Pro”, and none of them do the job, though the manufacturers says they work.

    1) Can you recommend a plug-in that is stable?

    2) Is there a chance that the functionality will be built into Enfold in an upcoming version?

    Kind regards,
    Hanne B. Stegemüller,
    Denmark

    #1314451

    there are a lot of opengraph online generators – you can do a search by yourself.

    after that you can manually insert the information via child-theme functions.php
    ( including other meta infos to your site head area ) f.e:

    function add_meta_to_head(){
    ?>
            <html prefix="og: https://ogp.me/ns#">
    	<meta name="viewport" content="width=device-width, initial-scale=1">
    	<meta name="description" content="best not more than 140letters">
    	<meta name="keywords" content=" seperated by commata ">
    	<link rel="shortcut icon" type="image/x-icon" href="/wp-content/uploads/icons/favicon.ico">
    	<link rel="apple-touch-icon" href="/wp-content/uploads/icons/apple-touch-icon.png">	
    	<meta property="og:title" content="Webers Worldwide Webdesign">
    	<meta property="og:site_name" content="Webers Webdesign">
    	<meta property="og:url" content="https://webers-webdesign.de">
    	<meta property="og:description" content="Webers Webdesign gestaltet Ihre individuelle Webseite nach Ihren Vorgaben. Wir setzen Ihr Corporate Design in eine technisch saubere Webseite um. Das leicht Machbare darf nie die Grenze auf dem Weg zu der Visualisierung Ihrer Ideen sein.">
    	<meta property="og:type" content="website">
    	<meta property="og:image" content="/wp-content/uploads/WeberWebdesign-OG-image.jpg">
    <?php
    }
    add_action('wp_head', 'add_meta_to_head');

    strange thing the first line comes to the right place with that snippet ( to html )

    it is best if the image has approx 1.91/1 aspect-ratio and has on minimum 1200px x 630px
    PS if Facebook is important for you – do not forget : fb:app_id

    #1314456

    By the way – if you want to do it the very right way – the image could be defined by that:

    <meta property="og:image" content="https://example.com/ogp.jpg" />
    <meta property="og:image:secure_url" content="https://secure.example.com/ogp.jpg" />
    <meta property="og:image:type" content="image/jpeg" />
    <meta property="og:image:width" content="1200" />
    <meta property="og:image:height" content="630" />
    <meta property="og:image:alt" content="A shiny red apple with a bite taken out" />

    see: https://ogp.me

    #1314465

    Hi Guenni007

    Thanks a lot for your kind answers. Now how I have something to work on with.
    I can not code, but I can make “copy and paste” :-)

    Kindest regards,
    Hanne B. Stegemüller

    #1314594

    yes and ( that was new to me too ) the link to ogp.me shows me that this might be a mandatory entry:
    <html prefix="og: https://ogp.me/ns#">

    f.e.: https://freecodetools.org/ogp/
    the code you got there comes to:

    function add_meta_to_head(){
    ?>
            <html prefix="og: https://ogp.me/ns#">
            // replace this by the code from ogp generators
    <?php
    }
    add_action('wp_head', 'add_meta_to_head');
    #1314597

    Hello again Guuenni007

    Thanks for all your kindness.
    I will look at this to. I have forwarded this thread to a friend who actually can code, and he has promised to take a look when he has time.
    This is much better than finding yet another plug-in (again).

    ../Hanne

    #1314616

    Hi,

    Thanks for your help @guenni007!

    Regards,
    Yigit

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.