Home Forums Plugin Support WP User Frontend Pro Pronamic google and image gallery won't show on portfolio post

This topic is: not resolved

This topic contains 5 replies, has 2 voices, and was last updated by  Tareq Hasan 5 years, 11 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #4379

    onafets
    Participant
    Post count: 30

    Hi,
    I am not sure why but in the newly created portfolio the Pronamic Google map doesn't appear but the location coordinates instead. I have added at my theme function.php, the function from Documentation>plugin integration

    I have in my backend-theme a image gallery option. How do I bring the same gallery option on my front end form?

    Here is a print screen of all the options I have on my backend that I'd like to have seamlessly, or at least to have them, on the frontend:

    #4382

    Tareq Hasan
    Keymaster
    Post count: 2831

    The custom field showing option doesn't actually shows the map correctly. So use the function call to show the map or use pronamic google maps as you are using it.
    [php]<?php echo wpuf_shortcode_map( ‘meta_key_name', $post->ID ); ?>[/php]

    I don't know how your theme is doing it. So can't give a solution. May be you should hire someone to do that.

    #4387

    onafets
    Participant
    Post count: 30

    ok, done with the map, it's appears but is somewhere in the ocean, not the coordinates I gave when I have submitted the post.

    Regarding the gallery, which I suppose is a custom field, theoretically if I get the custom field's names I can pull them up in some way on the front end post, am I right?

    Can you show me how can I pull the custom fields on the front end post?

    #4389

    Tareq Hasan
    Keymaster
    Post count: 2831

    Have you checked the documentation, there are some examples?

    #5212

    onafets
    Participant
    Post count: 30

    I have a doubt, in the snipped:
    how can I modified in order to appear for a custom post, I mean I have a portfolio item witch is called pt_item.

    function wpuf_pronamic_location( $post_id ) {
        $custom_field = 'address';
     
        if ( !class_exists('Pronamic_Google_Maps_Post') ) {
            return;
        }
     
        if ( isset( $_POST[$custom_field] ) ) {
            $address = $_POST[$custom_field];
     
            list( $def_lat, $def_long ) = explode( ',', $address );
     
            if ( $def_lat ) {
                update_post_meta( $post_id, Pronamic_Google_Maps_Post::META_KEY_LATITUDE, $def_lat );
            }
     
            if ( $def_long ) {
                update_post_meta( $post_id, Pronamic_Google_Maps_Post::META_KEY_LONGITUDE, $def_long );
            }
     
            if ( $def_lat && $def_long ) {
                update_post_meta( $post_id, Pronamic_Google_Maps_Post::META_KEY_ACTIVE, true );
            }
        }
    }
     
    add_action( 'wpuf_add_post_after_insert', 'wpuf_pronamic_location' );
    add_action( 'wpuf_edit_post_after_update', 'wpuf_pronamic_location' );
    
    #5213

    Tareq Hasan
    Keymaster
    Post count: 2831

    This code will work for every post type, you just need to change the post type in the post settings on that form.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Pronamic google and image gallery won't show on portfolio post’ is closed to new replies.