Jump to content
Sign in to follow this  
sgendry

Challenged creating new template for custom php

Recommended Posts

sgendry

This will be FYI. Something just clicked in my head and I am answering my own question as I post it (but too late to be able to delete this post). I wanted to create a page to put my website sitemap. I am using the Dagon Design Sitemap Generator plugin (http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/) Pasting <?php echo ddsg_create_sitemap(); ?> in a basic default wordpress theme was easy to get this done. Doing in Pagelines required a very different approach using hooks. I installed the (most excellent) pagelines-customize and pagelines-action-map plugins. My next challenge (which is where I am currently at) was to only have my hook display on a particular page. Just saw http://www.pagelines.com/forum/discussion/19429/adding-a-hook-to-a-certain-page/p1 and this is what I am going to try now. Will post the code here when / if I can get this to successfully work.

Share this post


Link to post
Share on other sites
sgendry
Fixed. Here is the hook I pasted in functions.php inside the pagelines-customize plugin folder: add_action('pagelines_loop_after_post_content', 'sitemap'); function sitemap() { if ( ! is_page( 590 ) ) return; ?>

Share this post


Link to post
Share on other sites
Simon
Copied from your cross post: Better code: http://paste.pagelines.com/498 Always namespace your functions, chances are there are 100's if not 1000's of sitemap plugins with functions called sitemap(). Also added a check to see if your sitemap plugin is enabled.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×