Support » Plugin: Stellar Places » Adding URL to location?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Micah Wood

    (@woodent)

    @oscwood,

    There is a way to do that, but it will require some customizations. Here is what you will need to do:

    1. Add a meta field on the place edit screen where you can input the URLs.
    2. Use the ‘stellar_place’ filter (requires version 1.0.2+) to add a ‘websiteUrl’ property that is populated from your new meta field.
    3. Copy the info-window.html template from the plugin into a new stellar-places folder in the root of your active theme.
    4. Customize the info-window.html template that you copied and use <%= websiteUrl %> to render the website url inside your link markup.

    Hi Micah

    Thanks for your quick reply. I have been staring at the place edit screen and just don’t understand how I add a meta field.

    I know this function exists when editing posts, but it doesn’t seem to appear when editing places…

    Or maybe I am missing something completely obvious. Any further help is greatly appreciated.

    Plugin Author Micah Wood

    (@woodent)

    You can enable custom fields by adding this code to your active theme’s functions.php file:

    add_filter( 'stlr_place-post_type_args', 'customize_stlr_place_post_type_args' );
    function customize_stlr_place_post_type_args( $args ) {
    	$args['supports'][] = 'custom-fields';
    	return $args;
    }

    If you don’t see the custom fields section on the place edit screen, just go to the ‘Screen Options’ in the top right and check the ‘Custom Fields’ box.

    You mention the “stellar_place filter” above. Where do I find info on the filter, I can’t see it on the plugin info page or your website?

    Plugin Author Micah Wood

    (@woodent)

    @deeve007,

    Sorry, I didn’t get an email notification of your question for some reason. That filter is relatively new and hasn’t been documented yet. We haven’t documented any of the actions or filters that the plugin makes available, which is a big fail on our part. Thanks for pointing this out.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding URL to location?’ is closed to new replies.