Jump to content
Sign in to follow this  
cstudio

Show Custom fields pagelines 2.0

Recommended Posts

cstudio    0
cstudio

I am new to pagelines and a novice at php. I don't know where to place the code to show the meta from custom fields. I am using 2.0.1. I found information for older verison but not 2.0 it seems different.

Share this post


Link to post
Share on other sites
kastelic    6
kastelic

Any code like this you have to insert with a hook. Here is an example which uses the hook "pagelines_after_postloop" and uses the basic "the_meta()" function which displays all the meta keys and values for a given post in an unordered list. You have to activate the Pagelines Customize plugin (free in the store) and then paste this in plugins/pagelines-customize/functions.php

	add_action('pagelines_after_postloop','display_meta');
	function display_meta(){
		if ( is_single() ) {
			the_meta();
		}
	}
	

List of hooks: http://api.pagelines.com/hooks Ways to display meta info: http://codex.wordpress.org/Custom_Fields#Displaying_Custom_Fields

Share this post


Link to post
Share on other sites
minute14    0
minute14

If i could pose an additional question... Comment: This works perfect on Platform Pro! Question: I have a checkbox form that allows people to select multiple answers and have only one challenge. Only one selection appears in my custom field instead of the multiple ones they chose. Is there a modification to the above code to allow multiple results entered in the custom field instead of the first one? thanks again!

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

Sign in to follow this  

×