WordPress.org

Ready to get started?Download WordPress

Forums

Can't get the post title to share! (2 posts)

  1. cdeguzman
    Member
    Posted 2 years ago #

    Hi everyone!

    Been pulling my hair out non stop for this.

    My website is http://www.swimbikerun.ph

    Everytime you share a post on facebook I got everything to work already.

    The thumbnail, url, post except, everything.

    Except for the post title. It's currently showing the url of the website.

    Please help me. I've been researching and installed virtually all the available og and meta plugins but to no avail :(

  2. cdeguzman
    Member
    Posted 2 years ago #

    Here is the code that I used.

    <title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' |'; } ?> <?php bloginfo('name'); ?></title>
    
    <head profile="http://gmpg.org/xfn/11">
    
    <meta property="og:title" content="' . get_the_title() . '"/>
    <meta property="og:type" content="blog" />
    <meta property="og:image" content="http://swimbikerun.ph/wp-content/uploads/2011/03/sbrforsmf.jpg" />
    <meta property="og:site_name" content="SWIMBIKERUN.ph" />
    <meta property="fb:admins" content="100001311737436" />
    
    <?php
    
    if (is_home()){
    echo '<meta name="title" content="SWIMBIKERUN.ph" />';
    }
    else {
    echo '<meta name="title" content="<?php echo get_the_title() ? | SWIMBIKERUN.ph>" />';
    }
    ?>
    
    <meta name="description" content="Triathlon and Multisport Philippines" />
    <meta name="google-site-verification" content="K-NaOEL3-5RfT3BlzzmtEMQPPSkHxNtMl7KzJci51y8" />
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <meta name="alexaVerifyID" content="Z5ETGNCOd-ny_NTPA-Q8DGyOGL8" />
    <link rel="image_src" href="http://swimbikerun.ph/wp-content/uploads/2011/03/sbrforsmf.jpg" />

Topic Closed

This topic has been closed to new replies.

About this Topic