WordPress.org

Ready to get started?Download WordPress

Forums

SimpleMap Store Locator
[resolved] Display single location on custom page (4 posts)

  1. ejames
    Member
    Posted 2 years ago #

    Hello,

    I'm hopping someone could lead me in the right direction.

    I would like to display the single location on a custom layout. Currently when i click a location it displays it using (i assume) my single.php page in my theme. Considering when i view the source it is using all my css from that page. I do not want my sidebar or any other elements that display on that page to show and i would like to rearrange the way it is display beyond what the CSS for simple map can do.

    Any help would be greatly appreciated!

    http://wordpress.org/extend/plugins/simplemap/

  2. ejames
    Member
    Posted 2 years ago #

    duplicate your single.php page and rename it single-sm-location.php. edit as needed.

  3. crystal_wcc
    Member
    Posted 1 year ago #

    Were any changes necessary to template.php? What folder did you put single-sm-location.php in? I cannot get a proper sidebar to show up on Location pages, and this may fix my issue.

    Thanks in advance for your help.

    Best Regards,
    Crystal

  4. ejames
    Member
    Posted 1 year ago #

    templates.php in the classes file of simple map?

    at or about line 101 you will see the function get_template_structure() - i over rode that by deleting everything in between the "" like so;

    $return = "";
    $return .= "";
    $return .= "";
    $return .= "";
    $return .= "";
    $return .= "";
    $return .= "";
    $return .= "";
    return apply_filters( 'sm-single-location-default-template', $return );

    from that point you can use your own css and simple maps shortcode as quickly described below.

    just copy and paste the single.php in your theme and rename the copied version single-sm-location.php ... Once you do that simplemap should use that as your output for a single location and you can edit that as needed using your css with simple maps short codes.

    Let me know if this helps. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags