Archived

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

  • 0

Show Custom fields pagelines 2.0

Question

Posted · Report post

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

2 answers to this question

Posted · Report post

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

Posted · Report post

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