Jump to content


Photo
- - - - -

How To Make PageLines Base Section Display Custom Fields

pagelines basesection sections custom fields

  • Please log in to reply
3 replies to this topic

#1 justinn

justinn

    Advanced Member

  • Members
  • 42 posts

Posted 05 June 2013 - 10:46 AM

Hi Guys,

 

I'm working on a site for a client and we're using Custom Press from WPMUDev to create custom post types and custom field for some job vacancy listings. The data entry side of it is all working. All I need to do now is make PageLines display the contents of the custom fields (There are only 2 custom fields).

 

Custom press gives me two pieces of PHP code that I would normally paste into the single.php file to make them display but I gather I should use the BaseSection plugin and create my own section to display the custom fields. This is the bit I'm stuck on! I don't need anything fancy at all... just need to get them to display. Please could someone point me in the right direction as to what I need to put in the BaseSection template to get it to output the custom fields from the following 2 chunks of php?

Please Login or Register to see this Hidden Content

Any help would be very gratefully appreciated.

 

Kind regards

 

Justin



#2 justinn

justinn

    Advanced Member

  • Members
  • 42 posts

Posted 05 June 2013 - 11:00 AM

Just doing some further reading... looks like that code needs to go in the post loop... Where can I edit that for the custom post type within the pagelines files?



#3 Martin Davies

Martin Davies

    Advocate

  • Moderators
  • 2469 posts
  • LocationManchester, England
  • Framework Version:latest
  • Country: Country Flag

Posted 05 June 2013 - 01:49 PM

I think the best thing to look at when creating a custom section are the Dev training videos 

Please Login or Register to see this Hidden Content



#4 Rob

Rob

    One Smart Egg

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

Posted 08 June 2013 - 04:33 PM

Hi Justin,

 

One option might be to use the Shortcode Exec PHP plugin to convert your PHP code to shortcode so that it can be assured of working in the Content Box, in a post or page or text widget.

 

To insert custom code into the postloop, I think you'd have to edit a cloned section implemented through Base Theme. The shortcode method would be easier.

 

Let us know, please, if this is suitable.







Also tagged with one or more of these keywords: pagelines, basesection, sections, custom fields