Archived

This topic is now archived and is closed to further replies.

  • 0

Change Template Used on front-end


Question

Posted · Report post

Hi, I'm trying to change the PageLines template that gets used when a certain request is viewed on the front-end of the site.  

 

I believe it'll be something surrounding the "page_type_breaker()" function -- and its respective filter, but it's called 777 times during the page load, and a lot of those are before the query's even run, so all it's footwork being run before there's much known about what the request is.

 

Basically I've got a Custom Post Type item that will override the requested URI (example.com/video/), so instead of an archive of videos, it'll be a video landing page.  The landing page template has been set up on the admin side, and it overrides the request just fine (it shows the content of the CPT), but PageLines loads the "default" template instead of the CPT template that's needed.

 

Any ideas would be greatly appreciated

Share this post


Link to post
Share on other sites

1 answer to this question

Posted · Report post

I believe I figured it out, by re-setting the global $post object, that function seems to return appropriately.  Crazy that I could spend all morning on this, and it's only I post to the forum that I figure it out ;)

 

Share this post


Link to post
Share on other sites