• Hi there – bit of an unusual one. I’ve just changed my site over from one URL to another (rebranding), and have set up the appropriate 301 redirect. The URL structure has remained the same, it’s just the domain name that has changed.

    Unfortunately Facebook doesn’t really seem to care. I’d obviously would love to maintain my like on the page, of the old articles before switch over. So I’m after a bit of code that allows me to insert the old domain name in the FB snippet if it was published before date x, and the new one after date x.

    Here’s the code for the FB like button, where it currently picks up the current page URL if you leave the data-href empty.

    <div class="fb-like" data-href="" data-width="100" data-height="30" data-colorscheme="light" data-layout="button_count" data-action="like" data-show-faces="false" data-send="false"></div>

    Any ideas how to adjust that to make it do the above?

  • The topic ‘If published date is before’ is closed to new replies.