The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

JM Twitter Cards
[resolved] Wrong URL parsed into twitter:domain (4 posts)

  1. Metro Fashion Hub
    Posted 3 years ago #

    The url of the site is http://www.metropolitanfashionhub.com. However the plugin picks up http://www.metropolitanfashionhub.com/wp/ (which is the folder where WP is installed) and uses that url to parse to twitter:domain. Which in turn will give a 404 error to anyone who clicks on it.
    I didn't see anything in the options to specify the correct URL. For the time being I've modified the plugin files and removed the following line:
    echo '<meta property="twitter:domain" content="' . get_bloginfo('wpurl') . '"/>'."\n";

    Is there a better way of fixing this?


  2. tweetpressfr
    Plugin Author

    Posted 3 years ago #

    get_bloginfo('wpurl') returns the "WordPress address (URL)" set in Settings > General. This data is retrieved from the "siteurl" record in the wp_options table.

    This issue is weird but you know bugs happen.
    So to me it would be a better solution to let the original meta remain intact and replace get_bloginfo() with home_url():

    echo '<meta property="twitter:domain" content="' . home_url() . '"/>'."\n";

    Hope this will help. Just tell me :)

  3. superterrific
    Posted 3 years ago #

    Hi, I was also having this issue and making your suggested change on line 267 in jm-twitter-cards.php worked for me, many thanks!

    To anyone else trying this, making the change on line 220 will not fix the issue.

    I'm hoping that this issue can be addressed in an upcoming update so I don't have to remember to come back and update that line of code.

    Thanks for the fix and the handy plug-in JM!

  4. tweetpressfr
    Plugin Author

    Posted 3 years ago #

    Ok cool, this will be updated, probably with get_bloginfo('url')

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • JM Twitter Cards
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.