Jump to content
bigdawggi

Change Template Used on front-end

Recommended Posts

bigdawggi    0
bigdawggi

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
bigdawggi    0
bigdawggi

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

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


  • Similar Content

    • DonRicardoRVM
      By DonRicardoRVM+
        First of all, sorry for my bad English.  I am developing an ecommeece with wp, woocommerce, PL5 and quickshop, and I need to do some changes in the simple product grid. I want to change the classes of some divs, but I can't find the templates. 
      Also, I change the grid of the category products pages, but I didn't make it correctly.
      This is the cat archive's: http://globosdemar.com/wp/categoria-producto/camisetas-para-ninos-y-ninas/
      Can you help me?
    • art23130
      By art23130+
      I have uploaded a file shoing missing sections for Custom Post Type
      It is OK for categories and tags but not for a single post types. 
      This is the link. 
      https://www.geoinformation.com/geocode_library/10-10570-rsg-2016-003/
      Any idea?
      thanks 
      Binder1.pdf
    • poseyg
      By poseyg+
      Could someone explain exactly how the new template sync works or what it is suppose to do?
    • Anthony King
      By Anthony King+
      I have to say that I like the Layout and the Template based sections. Some of them are really impressive.
      One of the things that I would like to request though is the possibility of being able to dynamically rearrange the layout.
      An example of what I am talking about is take the Agency Section. It's current layout starts with the
      Splash Module then the Portfolio Module then the Service Module and so on and so forth.
      What would be great is if we were able to move these modules around. I.e have the Service Module first
      then maybe the Splash, and then the portfolio.
       
    • flourishdesignstudio
      By flourishdesignstudio
      I am using Jigoshop on a website that also uses PL5 and am running into an issue where the store pages do not allow me to use the PL5 editor. Is anyone else having this problem or know if a solution? 
      When I open the Chrome console I see the following error:
      site.js?ver=b199df:5 Uncaught ReferenceError: PLData is not defined
          at Object.setMasterModel (site.js?ver=b199df:5)
          at Object.init (site.js?ver=b199df:5)
          at HTMLDocument.<anonymous> (site.js?ver=b199df:5)
          at i (jquery.js?ver=1.12.4:2)
          at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
          at Function.ready (jquery.js?ver=1.12.4:2)
          at HTMLDocument.K (jquery.js?ver=1.12.4:2)
       
      The problem can be seen here: http://fingerlakesdistilling.com/shop/ where the sidebar, footer, and header do not show up. Any thoughts?
      Thanks so much!
×