• Resolved aikidodeshi

    (@aikidodeshi)


    Hi folks,

    I have an odd one. I use a custom post type to display Courses for my aikido club website. On Chrome the links work fine, on some other browsers, I’m looking at you Safari, display the completely wrong template.
    I have other custom post types on the same site that work fine.

    The url is westmidlandsaikido.org.uk

    At the top of the site is a green box with the next course linked in it. That link should point to https://westmidlandsaikido.org.uk/courses/west-midlands-aikido-summer-school-2017

    That link is made up by getting the slug or the post type and adding the slug of the post to it. The get_permalink() wouldnt return the “pretty” url.

    Why is it that the site doesn’t work sometimes?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Anytime you change something related to permalinks, like adding a new post type, be sure to visit the permalink settings screen so the rewrite rules can be updated.

    The delivered HTML could be corrupted in a way that changes how some browsers interpret the markup. Run the page through the W3C Markup Validator and correct any errors that show up.

    There could be some code that is altering the delivered content based on user agent. Try disabling all plugins and switching to one of the default twenty* themes. You would of course need to isolate the code required to produce the custom post type and related content. Temporarily include the code with whatever default theme you use for testing.

    What’s left should work correctly in all browsers. Incrementally restore your theme and plugins, testing after each. When the problem returns, the last activated code is causing the problem.

    Thread Starter aikidodeshi

    (@aikidodeshi)

    Hi,

    Sorry for the delay, the message went into my spam folder and I missed it.

    I’ve been through and given this a whirl and still no joy. It truthfully baffles me.

    Thread Starter aikidodeshi

    (@aikidodeshi)

    As i turns out the issue was caued by the date formating.

    I have fixed the problem. Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom post type linking’ is closed to new replies.