• Resolved AThomas92

    (@athomas92)


    Hi,

    I’ve got a partial template set up that displays each item of a particular post type with an ‘Apply’ button next to it. The intention is that when a user clicks one of the ‘Apply’ buttons, it will open a Contact Form 7 form within a lightbox (I’ve added the code for lightbox in the page content rather than in the partial template).

    However, despite the fact that the link href reads “#application_form” in the element inspector, when I click one of the buttons, it tries to take me to /apply/TheTitle.html, which then returns a 404 error.

    What’s weird is that if I add a button in the page content with an href of “#application_form”, the lightbox and form opens fine.

    I’ve tried disabling all plugins other than Contact Form 7 and Easy Fancybox but the problem still persists, so I guess it could be something to do with the way WordPress is handling the partial template?

    Any help is much appreciated.

    https://wordpress.org/plugins/easy-fancybox/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    No idea where this redirect to “/apply/TheTitle.html” could be coming from… Any messages in your browser script console?

    I’d need to see it live to be able to tell you anything useful.

    Thread Starter AThomas92

    (@athomas92)

    Hi RavanH,

    Thanks for getting back to me and sorry I’ve been so long replying.

    No messages are appearing in the console (in Safari or Chrome), although in Chrome the lightbox does open briefly, until the page redirects. It’s on a dev site which I’ve got locked down so I don’t really have a live version I can show you unless you’re happy to PM me (can you do that through wordpress.org?) your IP so I can allow you access?

    Thread Starter AThomas92

    (@athomas92)

    I’ve realised I’ve been a bit a plonker and I’d forgotten to deactivate a script that was causing this behaviour, so problem solved!

    Thanks anyway

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Links to open lightbox are directing to a page’ is closed to new replies.