Jump to content


Photo
- - - - -

Custom Post Type Special Page -- Only Some Sections Work

custom post type special pages landing page

  • Please log in to reply
12 replies to this topic

#1 bigdawggi

bigdawggi

    Member

  • Members
  • 13 posts
  • Country: Country Flag

Posted 11 April 2013 - 02:32 PM

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:  

Please Login or Register to see this Hidden Content

Gallery Landing Page:

Please Login or Register to see this Hidden Content

 

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?

 

 

 

 



#2 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 11 April 2013 - 08:58 PM

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.



#3 bigdawggi

bigdawggi

    Member

  • Members
  • 13 posts
  • Country: Country Flag

Posted 16 April 2013 - 07:38 AM

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!



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 16358 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 16 April 2013 - 09:29 AM

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.



#5 bigdawggi

bigdawggi

    Member

  • Members
  • 13 posts
  • Country: Country Flag

Posted 16 April 2013 - 05:54 PM

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?



#6 bigdawggi

bigdawggi

    Member

  • Members
  • 13 posts
  • Country: Country Flag

Posted 16 April 2013 - 05:55 PM

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



#7 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 16 April 2013 - 08:43 PM

Hey Bigdawggi

 

Can you paste the full code you're using into the paste bin so it can be checked over -

Please Login or Register to see this Hidden Content

 

Then drop us the url for the paste back here.



#8 bigdawggi

bigdawggi

    Member

  • Members
  • 13 posts
  • Country: Country Flag

Posted 17 April 2013 - 07:48 PM

Hi James, here you go:

 

Video CPT Plugin Here:

Please Login or Register to see this Hidden Content

CPT landing page code here:

Please Login or Register to see this Hidden Content

 



#9 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 20 April 2013 - 03:36 PM

Hi,

 

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



#10 meilena

meilena

    Advanced Member

  • Members
  • 62 posts
  • Country: Country Flag

Posted 23 April 2013 - 01:01 PM

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.



#11 bigdawggi

bigdawggi

    Member

  • Members
  • 13 posts
  • Country: Country Flag

Posted 23 April 2013 - 02:48 PM

Sure, I appreciate your help



#12 bigdawggi

bigdawggi

    Member

  • Members
  • 13 posts
  • Country: Country Flag

Posted 10 May 2013 - 06:02 AM

Hi there guys, any movement on this?



#13 Danny

Danny

    Is Awesome!

  • Moderators
  • 16358 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 10 May 2013 - 09:14 AM

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.

 

Please Login or Register to see this Hidden Content







Also tagged with one or more of these keywords: custom post type, special pages, landing page