• Hi guys, My site is still in maintanance mode.

    I have an issue. I added as described, a code in the function.php to add a custom marker.
    In the extra options there is a field to put the url to the custom marker. I put the url in this field, but still the default marker appears.
    Any suggestions?

    Thanks a lot!
    Pieter-Jan

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    If you switch back to a default WP theme, does it then also not work? If you access the marker directly from your browser, so domain.com/marker-path/marker-name.xxx then it does load fine?

    Thread Starter pieterjanderks

    (@pieterjanderks)

    Hi Tijmen,
    First of all compliments with your good work!
    I added code to main theme, afterwards to the child theme, no difference, it keeps showing the default marker of the plugin. I use Divi and I use a child theme.
    This is the path to the marker, it is also correct: https://degemeentedeurne.nl/wp-content/uploads/2020/03/markerbouw.png

    I maybe has something to do with the child theme…

    Thanks!

    The code I add tot the functions.php of my active child theme.

    add_filter( ‘wpsl_meta_box_fields’, ‘custom_meta_box_fields’ );

    function custom_meta_box_fields( $meta_fields ) {

    $meta_fields[__( ‘Additional Information’, ‘wpsl’ )] = array(
    ‘phone’ => array(
    ‘label’ => __( ‘Tel’, ‘wpsl’ )
    ),
    ‘fax’ => array(
    ‘label’ => __( ‘Fax’, ‘wpsl’ )
    ),
    ’email’ => array(
    ‘label’ => __( ‘Email’, ‘wpsl’ )
    ),
    ‘url’ => array(
    ‘label’ => __( ‘Url’, ‘wpsl’ )
    ),
    ‘alternate_marker_url’ => array(
    ‘label’ => __( ‘Marker Url’, ‘wpsl’ )
    )
    );

    return $meta_fields;
    }

    Plugin Author Tijmen Smit

    (@tijmensmit)

    You also added this code to the functions.php?

    add_filter( 'wpsl_frontend_meta_fields', 'custom_frontend_meta_fields' );
    
    function custom_frontend_meta_fields( $store_fields ) {
    
        $store_fields['wpsl_alternate_marker_url'] = array(
            'name' => 'alternateMarkerUrl'
        );
        
        return $store_fields;
    }
    Thread Starter pieterjanderks

    (@pieterjanderks)

    Oeps, I will try this later on…!
    Thank you so far!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom markers’ is closed to new replies.