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

    • ideascurator
      By ideascurator+
      Hello Pagelines,   I no longer use pagelines services. I have deactivated the automatic annual payment. But it already charged to my credit card. Since I cancelled my contract before the end, Can I request to refund?
    • Anthony King
      By Anthony King+
      Hello,
      I am wanting to know what the status of the Pagelines Platform.
      I have noticed that there has been absolutely no updates on Platform 5 for over 8 months.
      Please tell me you haven't gone off on another tangent and going to build the next great solution
      and then leave all of us to have to completely rebuild our sites like we did for
      Pagelines, then DMS, then Pagelines Platform.
      I like what you build, but what you need to do is build one product and then make it better, rather than 
      abandoning it and building something else.
      You haven't done anything for so long that even WordPress is providing a warning.
      "Warning: This plugin has not been tested with your current version of WordPress."
      So what is the Status. I mean if I am going to pay a monthly fee for a product, I don't want to pay for one
      that is no longer being supported. You have a great product, I'm not bashing it, I'm just wondering what 
      your next move is because I have business decisions to make for myself, and whether of not this is something
      I should stick with.

      Please be kind enough to respond.

      Thank You,
      Anthony
    • 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.
×