Archived

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

  • 0

How To Make PageLines Base Section Display Custom Fields


Question

Posted · Report post

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?

<?php echo do_shortcode('[ct id="_ct_text_51af0ad725f0d" property="title | description | value"]'); ?> 


<?php echo do_shortcode('[ct id="_ct_datepicker_51af0c9f505d0" property="title | description | value"]'); ?> 

Any help would be very gratefully appreciated.

 

Kind regards

 

Justin

Share this post


Link to post
Share on other sites

3 answers to this question

Posted · Report post

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?

Share this post


Link to post
Share on other sites

Posted · Report post

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.

Share this post


Link to post
Share on other sites