Archived

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

  • 0

Custom Post Type Special Page -- Only Some Sections Work


Question

Posted · Report post

Website URL: (local, not available)
Framework Version: 2.4.1
WordPress Version: 3.5.2
Plugins in Use: My own custom ones that just create a custom post type
Server/Host: Apache 2.2
Screenshots: 

 

Video Landing Page:   http://glui.me/?i=52xhbdfortrxqr8/2013-04-11_at_8.13.53_AM.png/

Gallery Landing Page: http://glui.me/?i=9bkiomi3towoxu3/2013-04-11_at_8.20.46_AM.png/

 

Details:

 

I override the main query at 'wp' action to pull the CPT Landing Page for the originally queried post type.  I set the global $post and do setup_postdata() with it. The page template seems to respect the various sections I have assigned to the CPT, but (besides the "features" section) not the *settings* for the respective section.

 

For example, the masthead section's oset property is:

Array
(
[post_id] => (no post ID)
[clone_id] => 1
[group] => masthead
)

 

Any ideas?

 

 

 

 

Share this post


Link to post
Share on other sites

12 answers to this question

Posted · Report post

Sure, not a problem:

 

/videos/test-one -- Loads the specified "test one" CPT with it's sections and their respective settings just fine.

/videos/ -- Would typically load an archive view of videos (which is supported just fine by PL).  I have created a CPT of "landing page", where if the request is for /videos/, I hook in at 'wp' and query for a specific landing page post type item.  I then override the global $post object with that landing page post type item, and do setup_postdata() for that item -- so that all global references for $post are now pointing to that landing page post type item.

 

PL seems to handing referencing which sections are assigned to that post type item, but not the settings that are set against that item's assigned sections -- except the "features" section seems to respect the landing page item's settings.

 

Does that make more sense?

Share this post


Link to post
Share on other sites

Posted · Report post

...and I just wanted to say I appreciate your assistance!

Share this post


Link to post
Share on other sites

Posted · Report post

Hi,

 

Danny will be in tomorrow morning, so I've written him to take a look at your code.

Share this post


Link to post
Share on other sites

Posted · Report post

Hey Bigdawggi

 

Can you paste the full code you're using into the paste bin so it can be checked over - http://paste.pagelines.com/

 

Then drop us the url for the paste back here.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi,

 

We are still looking into your request, please bear in mind this is an advanced question and may take more time with a response.  Thanks for your patience.

Share this post


Link to post
Share on other sites

Posted · Report post

Sure, I appreciate your help

Share this post


Link to post
Share on other sites

Posted · Report post

Hi there guys, any movement on this?

Share this post


Link to post
Share on other sites

Posted · Report post

Hi,

 

We apologise for the delay in regards to resolving your topic. I must admit, that PHP is currently not my forte so I am unable to assist you. However, I will bring this to the attention of our developers again but they're currently extremely busy.

 

What I would recommend in the meantime, while you wait for a response. is for you to signup to our developers community. If accepted, you will have access to our developer community Skype room, where you can speak to fellow developers for assistance and advice.

 

http://developer.pagelines.com/apply/

Share this post


Link to post
Share on other sites

Posted · Report post

Hi there,

 

These type of customizations are outside of our main support spectrum, but I'll check with a developer for you to see if they can advise anything they spot in your code which is stopping the changes from taking place.

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks James, that'd be really great if they provided some tip for this.  I'm overriding the global $post at the 'wp' action, so in my thinking no template setup should've happened by that point.  I look forward to a reply if they can!

Share this post


Link to post
Share on other sites

Posted · Report post

Hi,

 

Can you go into more detail as to what you're actually trying to achieve please. I have create hundreds of custom post types and all sections are available.

Share this post


Link to post
Share on other sites