Jump to content
justinn

How To Make PageLines Base Section Display Custom Fields

Recommended Posts

justinn    0
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    0
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    230
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    547
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

    • 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
    • thirdstonemedia
      By thirdstonemedia+
      I've been fighting with a resolution issue ? Want to use Flick Slider, the site looks great on my monitor but client says she can't see bottom of homes. I believe she's on an old PC using outdated browser/s ... but, she's important to me and I'd like to make this work, on her system. Without asking her adjust her own set-up. 
      I put the Flick Slider inside a container, here ::
      http://becauze.xyz/home-five
      Set the Height of Flick Slider to 50 Base ... I don't know how this works exactly ... there is a Base then a Min ... but, haven't adjusted the Min ::
      http://becauze.xyz/home-four/
      Tried using Splash Up, which presents the same issue (she can only see top of home) and she wants several images to rotate on Home page, so not sure this would work anyway ::
      http://becauze.xyz/
      I have tried going into Layout and making the width narrower, and that does make the site narrower, but the homes still don't display in full, on her system. Help ?

      Here are her screen grabs, both desktop and iPad  (dumped the chalkboard background).

      FInally, she said these look great ::
      http://www.sinclairaia.com/
      http://www.kristihanson.com/
      What am I doing wrong ?? Is there a better way to accomplish making the site look great on any resolution at any size ?
      Joanne
      (Longtime Pagelines-lover.)


    • Suneel
      By Suneel+
      I updated my theme to framework and now can't get rid of this bright blue bar that appears across the top of every page. It says, "A fixed bar that makes it easy to promote important content.", and then a button that says, "Get PageLines".
      I am a novice and need help.
      Thank you!
      Natalie
    • kwaoru
      By kwaoru
      Hi,
       
      I have been using DMS and pagelines.
      I am facing to a huge trouble with the appearance of one of my page on mobile (smart phones) built with pagelines.
      However I haven’t come to any solutions to organise either edit the appearance of mobile view to look neat or deactivate the responsive function. 
      Now it looks totally messy on the phone...
       
      1. Is there any way to edit the appearance of the mobile version (responsive theme)?
      2. Is there any way to deactivate responsive function?
       
      If I could receive support from you to go thorough this process I would be happy to be a pro member. 
       
      Looking forward to hearing from you.
×