Jump to content


Photo
- - - - -
Resolved

Dynamic Post Creation : Individual Page Content Layout Not Getting assigned

Dynamic Post Creation Custom Post Types Page Content Layout

  • Please log in to reply
6 replies to this topic

#1 linkinp

linkinp

    Member

  • Members
  • 26 posts

Posted 16 September 2012 - 03:42 AM

I have a custom post type.
I have customized its archive layout and single post layout in Drag and Drop.
Plus in single post layout I have added boxes in the content area.
However in drag and drop I do not find the Page Setup Layout option, so I click Page Options and Blog Page and I set the layout ( Individual Page Content Layout ) to the second option which is content and one sidebar

---
Now,
I create custom posts dynamically based on users input.
and I figured out that I can enable boxes ( make them visible ) dynamically based on users input. B)

----
Everything is working just the way I want ..EXCEPT .... :(
I am not able to set the Individual Page Content Layout for the dynamically created post.
All my dynamically created posts show up as basic full page without side bars.

---
Am I missing something.
Should I be also setting a custom field value ?
--

#2 linkinp

linkinp

    Member

  • Members
  • 26 posts

Posted 16 September 2012 - 04:36 AM

I did some digging around and I can simply rephrase this question as ,

Where is the value for "Individual Page Content Layout" assigned to individual custom posts stored ?

My guess was it would be stored in wp_postmeta and that I could simply manipulate it there for my dynamic post, but its not there. ?

Please advice

#3 Danny

Danny

    Is Awesome!

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

Posted 16 September 2012 - 10:45 AM

Hi,

So do you want to be able to control the default settings similar to Blog Post in Page Options ?

#4 linkinp

linkinp

    Member

  • Members
  • 26 posts

Posted 16 September 2012 - 04:06 PM

I am creating custom posts using wp_insert_post
Everything works fine, just that I am unable to set the post to have one side bar
The post has the default wide page layout.

How can I set the post to get the second layout ( Page with one right sidebar ).

#5 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 16 September 2012 - 04:12 PM

The setting is stored in the post meta, take a look in the database the key is _pagelines_layout_mode

#6 linkinp

linkinp

    Member

  • Members
  • 26 posts

Posted 16 September 2012 - 04:35 PM

Excellente !!!

#7 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 16 September 2012 - 04:38 PM

The topic was marked as resolved.





Also tagged with one or more of these keywords: Resolved, Dynamic Post Creation, Custom Post Types, Page Content Layout