Jump to content
justinn

How To Make PageLines Base Section Display Custom Fields

Recommended Posts

justinn

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
justinn

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
greenfly

I think the best thing to look at when creating a custom section are the Dev training videos http://developer.pagelines.com/resources/


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
Rob

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.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • yemoonyah
      By yemoonyah+
      Hi, even though I just got a SSL certificate, I can't get the green padlock to appear due to the following error:
      :A file with an insecure url of "http://yemoonyah.com/wp-content/plugins/pl-section-boxes/check.svg" was loaded via the javascript file: https://yemoonyah.com/wp-includes/js/jquery/jquery.js?ver=1.12.4 on line 3. The insecure URL may not be directly contained in the script file and may exist elsewhere."
      I figured if I delete and re-install the plugin it might fix the problem but will my boxes on the website still be there? Or do I have to redesign everything all over again if I delete the plugin and then re-install it?
    • werdnags
      By werdnags+
      Can anyone guide me please?
      I would like to learn how to achieve custom fields and going to give ACF plugin a try.  I have watched all the videos and read the documentation and all is good except I can find the template files for the pages and posts.  I believe I should be looking for the file single.php but what about posts?  Is the reason I can't find them because I am using a framework? Pagelines Framework?  How can I add my custom fields to the templates on Pagelines Framework?
      Any guidance would be appreciated please.
    • tuciudadenred
      By tuciudadenred+
      Hi everyone, what happens is that the web page metrosalarmas.com has a google tags which I have not attacked where I can look to remove those tags and be able to locate the correct ones.
    • cstudio
      By cstudio
      Hello,
      I need some help!  I am trying to add a Square booking script.  When I add it to a embed section it crashes the page editor and I am unable to save the page version.  I have tried using different browsers with the same result.
       I can add the script on the backend in the word press content area and get it to show and work, but it look terrible.  A page with in a page.  http://www.zoeanastacia.com/booking/.
      I need help getting the page editor to work properly or to make the wp content section to not look like an 90's iframe.
      Thanks
    • oseehys
      By oseehys+
      Hello There,
      So i want to use platform 5 and DMS sections on a single page, i am using a child theme with pinspro as my main theme and i activated platform 5, the only problem am having so far is the fixed option, my navbars are not aligning to their default size, and it will be great if platform 5 header and footer section will function, has anyone used this option, how can i make the best use of platform 5 and DMS on a site
      Cheers
×