• I have this template wherein i have a googlemap – in the database i have some custom post types with latitude and longitude assigned to them – and i want to call them from the database and onto the map based on some filtering.
    So from within my theme template i call an external php query with jquery/ajax .. or at least i tried. it does not work.
    In my theme i write:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    I am sure the problem is in the way i handle POST in the php file – but i cant find any good examples showing me how this should be done in wordpress – can anybody tell me ? maybe im doing it the wrong way ? maybe there is another aproach that i have missed ?
    the purpose of this test is to make a theme-template with a google map embedded – then place pins on the maps based on filtering cattegories from the custom post type – and then show the content in a jquery dialog or fancybox when user clicks on a coresponding pin.

  • The topic ‘how do i pass variables from php to jquery ?’ is closed to new replies.