• Resolved qwik3r

    (@qwik3r)


    I have single post urls that just end in /?=124. When I share this url, instead of showing the feature image/description from that single page it shows a canonical url from another page. I am redirecting my homepage to a different page so perhaps it’s getting it from there since in Facebook open graph debugger it says “301 redirect”, however the post itself is NOT redirecting (nor should it). So what could be going wrong here that it’s not using the correct url for open graph?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter qwik3r

    (@qwik3r)

    I realize what the issue is. I have a script that I’m using to have posts just have the post ID in the url while pages have the page name, but I guess that is messing things up. ;x

    add_filter(‘post_link’, ‘custom_post_link’, 10, 2);
    function custom_post_link($permalink, $post) {
        if ($post->post_type == ‘post’) {
            $permalink = home_url(‘?p=’ . $post->ID);
        }
        return $permalink;

    Plugin Author Benjamin Denis

    (@rainbowgeek)

    Thank you for this update.

    Can you confirm this is working now?

    Plugin Author Benjamin Denis

    (@rainbowgeek)

    Due to topic inactivity we are now closing this.

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