logo
Ask your WordPress questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$30
Changing an Ajax theme into a 'normal' one?

I'm using a Theme Forest theme: Pluto (http://themeforest.net/item/pluto-fullscreen-cafe-and-restaurant/534738)

It's very nice looking but as it's Ajax driven and doesn’t support custom permalink...

So as soon as the website appeared on Google all link referred send to some black page which seem to be out of the website:

Link appearing in Google: http://www.thaiorchid.be/contact (black page)
Compared to the real webpage: http://www.thaiorchid.be/#menu-item-19

Any way to cut that Ajax style navigation from some part of the website and have the correct navigation /contact ?

Many thanks,
Jonathan

Jonathan Surinx | 05/24/12 at 4:52am Edit


(4) Possible Answers Submitted...

Note: Jonathan Surinx felt their question was unanswered, so we granted them a refund.

Note: Jonathan Surinx requested a refund. They offered this explanation:

"Didn't find a working answer here, but got help from a great developer and published the solution here: http://stackoverflow.com/questions/10755100/best-solution-to-redirect-urls-to-an-ajax-version

Thanks
"

If no one challenges a refund request, then they are automatically granted and proccessed after 48 hours. Admins of this site only review refund requests if someone challenges the request. If you are curious about how we handled previous refund requests, you may read over all refund requests and their challenges.

See a chronological view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    05/24/12
    5:01am
    Francisco Javier Carazo Gil says:

    Jonathan,

    Have you tried this? From SO:

    here's the usual dilemma with AJAX requests for content only in WP: You want the link, when clicked load a page as usual. But you also want to use the same link to load the same page via AJAX and then you don't want the layout to be loaded as well.

    Assuming that this is the core of your problem, here's how I handle this usually:


    // functions.php
    function is_ajax_request() {
    return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) &&
    strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
    }


    // e.g. in index.php or any other template file:
    <?php if (!is_ajax_request()) { get_header(); } ?>

    // ... Rest of your template ...

    <?php if (!is_ajax_request()) { get_footer(); } ?>

    • 05/24/12 5:38am

      Jonathan Surinx says:

      Thanks for the reply, I tried your suggestion but I don't seem to be able to make it work.

  • avatar
    Last edited:
    05/24/12
    5:09am
    Sébastien | French WordpressDesigner says:

    is it not better to make a redirection to http://www.thaiorchid.be/#menu-item-19 from http://www.thaiorchid.be/contact

    (no redirection if it's an ajax request)




    function is_ajax_request() {
    return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');

    }


    /*in page.php*/
    if (!is_ajax_request()) {

    if (is_page('contact') {
    header('Status: 301 Moved Permanently', false, 301);
    header('Location: /#menu-item-19');
    }
    }



    • 05/24/12 5:12am

      Sébastien | French WordpressDesigner says:

      with this method, google will use http://www.thaiorchid.be/#menu-item-19


      PS : you could probably rewrite url in jquery

    • 05/24/12 5:36am

      Jonathan Surinx says:

      It's maybe an idea but I've got about 50 pages in the website + translations coming...

    • 05/24/12 6:54am

      Sébastien | French WordpressDesigner says:

      hum...


      you can probably modify the jquery. It's possible to use permalink like in this theme
      http://www.wizzmyworld.com/#wizz-my-event

  • avatar
    Last edited:
    05/24/12
    5:26am
    Agus Setiawan says:

    theme is fully AJAX and custom permalink is not support.

  • avatar
    Last edited:
    05/26/12
    10:12am
    Arnav Joy says:

    Hi Jonathan ,

    Can you provide me access to your site , I would like to have a look into it.

    my email is : thearnavjoy@gmail.com

    skype : arnav.joy

This question has expired.





Current status of this question: Refunded



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.