WordPress.org

Ready to get started?Download WordPress

Forums

Store Locator Plus
Store Page Template (12 posts)

  1. troypoint
    Member
    Posted 1 year ago #

    Hello,

    I need to alter the way that the store pages look. It looks like it is using the post layout instead of page layout. We don't want the author byline or comments. I understand that I can go in and get rid of comments through the editor but we have over 500 "stores" - http://www.iowapga.com/iowa-golf-course-directory/

    Is there a place within the code that I can change it to use the page layout instead of the post layout?

    Thank you very much.

    http://wordpress.org/extend/plugins/store-locator-le/

  2. seo-uk
    Member
    Posted 1 year ago #

    Hello,

    Not sure if you can change the template within SLP as I have not looked at that but I have changed the existing template to suit my needs.

    You can edit the template within your theme. To do this create a child theme, if not using your own, and copy single.php to the child directory. Open it up in an editor and remove what you do not want.

    In what you describe you need to remove the meta.

  3. troypoint
    Member
    Posted 1 year ago #

    Thanks seo-uk!! I understand how to change my template files but the Store Locator Plus is just a small portion of my site so I wouldn't want to do that. All I want to do is be able to change the current structure that it renders. If I could create a new single.php and name it something else and then direct SLP to use that instead, that would be great. Thanks for your time.

  4. troypoint
    Member
    Posted 1 year ago #

    I fixed it by adding the following to custom css under Pro Pack -
    .post-info { display: none; }

  5. seo-uk
    Member
    Posted 1 year ago #

    Hello,

    Just searched the code and it appears to be creating a post.

    // Create the page
    //
    $slpNewListing = array(
    'ID' => (($store['sl_linked_postid'] > 0)?$store['sl_linked_postid']:''),
    'post_type' => 'store_page',
    'post_status' => 'publish',
    'post_title' => $store['sl_store'],
    'post_content' => call_user_func(array('SLPlus_AdminUI','slpCreatePageContent'),$store),
    );

    Be interested in the answer as it may crop up.

  6. Charleston Software Associates
    Member
    Plugin Author

    Posted 1 year ago #

    Posts and pages are the same thing in WordPress. A page is just a specialized type of post, thus all the references in the named array to things like 'post_type' and 'post_status'.

    The 'post_type' => 'store_page' is the metadata that tells WordPress "this is a custom page type". The post type of "store page" is registered as a custom type of WordPress page.

    You'd use the same calls to create a new page in WordPress but use 'post_type' => 'page' instead.

  7. seo-uk
    Member
    Posted 1 year ago #

    Thanks for that.. I change my single template to take out comments and meta.. I guess the question was/is there a way to point to specific template?

  8. ivadenis
    Member
    Posted 1 year ago #

    Looking for directions too! Please advise!

  9. ivadenis
    Member
    Posted 1 year ago #

    Ok, I managed to figure something out!
    In order to direct specific template for Store Pages I did the following:

    In my theme's single.php I added the following conditions:

    <?php
    if ( $post->post_type=='store_page' )
    {
            require_once (TEMPLATEPATH . '/single_storepage.php');
    }else
    {
    	require_once (TEMPLATEPATH . '/single_blog.php');
    }
    
    ?>

    Then I added single_storepage.php where I could tweak it any way I wanted!

    Hope this solution helps!

  10. Charleston Software Associates
    Member
    Plugin Author

    Posted 1 year ago #

    @ivadenis - thanks for sharing!

  11. TechDaddyK
    Member
    Posted 1 year ago #

    This was very helpful. Thanks, ivadenis!

    I tied in a separate database table with lots of additional fields, all connected with the sl_id. It's working great for our 1700+ dealer locations.

    Now I'm building a password-protected form that our dealers can use to edit their info directly. Since we have multiple product lines, I'm giving them checkboxes to indicate which products they carry, too.

  12. Charleston Software Associates
    Member
    Plugin Author

    Posted 11 months ago #

    Product support is provided here:
    http://www.charlestonsw.com/forums/forum/support-2/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.