Results 1 to 1 of 1

Thread: Embeding Google Map on Adding Fields Does Not work

  1. #1
    Thread Starter
    Amateur
    Not a Verified Customer
    icecubejackal's Avatar
    Join Date
    Aug 2009
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Embeding Google Map on Adding Fields Does Not work

    Hi!

    Since google map does not work on multiple subdomain, im using a embed google map by adding extra fields in post page by following this instruction.

    link on how to add extra fields in classpress
    viewtopic.php?f=11&t=209

    THE PROBLEM: it will not save the iframe code map in the extra field i add.

    post-form.php
    <label for="map"><?php _e('Map','cp'); ?></label>
    <textarea name="map" id="map" class="adfields" rows="5" cols="46" onkeydown="textCounter(document.new_post2.map,docu ment.new_post2.remLen1,5000)"
    onkeyup="textCounter(document.new_post2.map,docume nt.new_post2.remLen1,5000)"><?php echo $_POST['map']; ?></textarea>


    form-process.php
    $name_ad = cp_filter($_POST['name_ad']);
    $phone = cp_filter($_POST['phone']);
    $price = cp_filter($_POST['price']);
    $location = cp_filter($_POST['location']);
    $map = cp_filter($_POST['map']);
    $name = cp_filter($_POST['name_owner']);
    $email = cp_filter($_POST['email']);
    // $title = cp_filter($_POST['title']);
    $post_tags = cp_filter($_POST['post_tags']);
    $cp_adURL = cp_filter($_POST['cp_adURL']);
    $featured_ad = cp_filter($_POST['featured_ad']);

    and

    add_post_meta($post_id, 'location', $location, true);
    add_post_meta($post_id, 'map', $map, true);
    add_post_meta($post_id, 'price', $price, true);
    add_post_meta($post_id, 'name', $name, true);
    add_post_meta($post_id, 'email', $email, true);
    add_post_meta($post_id, 'phone', $phone, true);
    add_post_meta($post_id, 'images', $images, true);
    add_post_meta($post_id, 'expires', $expires, true);
    add_post_meta($post_id, 'cp_adURL', $cp_adURL, true);

    function.php
    function custom_search_where($where) {
    $old_where = $where;
    if (is_search() && isset($_GET['s'])) {
    global $wpdb;
    $customs = Array('name', 'price', 'phone', 'location', 'map');
    $query = '';
    $var_q = stripslashes($_GET['s']);

    single.php

    <?php _e('Map','cp'); ?>

    <?php echo get_post_meta($post->ID, "map", true); ?>



    Hoping that somebody can help me figuring out this problem.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)