Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress adding #! and -2 to URLs??

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #157953
    stw2011
    Participant

    Hi,

    I am making changes to pages on my wordpress site seen here
    http://evanography.com/wp/

    And once you click somewhere, the links change to something like this:
    http://evanography.com/wp/#!/flight-school-2/aircraft-rental-2/

    I don’t know why there is -2 or #! in the url bar…and it prevents me from going to the correct page….if you remove the #! and -2 the page loads correctly so I don’t know why that is happening

    Thank you

    #157954
    __
    Participant

    The “shabang” (#!) is used (in this case) for keeping a history state when you have an ajax-based site. You’re loading all of your content via ajax, and the part of the URL after the shabang serves as a history entry so you can still use the browser’s [back] button. The page is not reloaded, since everything after a hash (#) is considered a “fragment.”

    it prevents me from going to the correct page….if you remove the #! and -2 the page loads correctly

    It seems to be working properly when I try it…? Can you describe your problem further?

    #157955
    stw2011
    Participant

    Ah, thanks for the explanation.

    For the issue…
    http://evanography.com/wp/ click on Flight School > Success Stories.

    the image sliders on the page do not appear correctly until I remove the #! from the URL address bar. Otherwise, clicking on the link it takes you to ( http://evanography.com/wp/#!/flight-school-2/success-stories/ ) does not load the image sliders at all

    #157972
    __
    Participant

    I would suspect that this is happening because the slideshows are being loaded (and yes, they are there; check the DOM inspector) after the slideshow plugin has been initialized – so, basically, the slideshow script doesn’t “know” these new slideshows exist.

    You would have to either run the slideshow script again, either manually, or figure out how to trigger an event to inform the slideshow script that a new slideshow was loaded. Unfortunately, this might be a bit complicated, especially from “inside” wordpress. Another member here might be able to offer some insight…?

    The alternative would be to go back to using regular http requests, and not use ajax to load your pages.

    #157973
    stw2011
    Participant

    How would I go back to regular http requests with wordpress?

    It sounds as if that would solve my issue

    Thank you

    #157976
    __
    Participant

    I don’t use WP, so I don’t know specifically. How did you switch to using ajax in the first place? I’d guess it’s a plugin…? maybe part of your theme…?

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Back End’ is closed to new topics and replies.