Jump to content


Registering Sections

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1 stereoscott



  • Members
  • 15 posts

Posted 23 October 2010 - 05:55 AM

I was looking to add my own sections to my child theme based on pagelines and saw the example for the pull quote:

 pagelines_register_section('BasePullQuote', 'pullquote', null, array('child' => true) );

However, this was happening too late in the process and any edits to the meta options for posts were not being registered. Looking at the code I think this is a better way to do it:

	// in child theme functions.php
	// needs to happen before core.init.php include
	add_action('pagelines_register_sections', 'my_register_sections');
	/* Hello! First, lets load the PageLines core so we have access to the functions */
	require_once(TEMPLATEPATH . "/core/core.init.php");
	// ...
	function my_register_sections() {
	    pagelines_register_section('BasePullQuote', 'pullquote', null, array('child' => true) );
	    //pagelines_register_section('MyOtherSection', 'myothersection', null, array('child' => true) );

#2 arpowers



  • Administrators
  • 3272 posts

Posted 23 October 2010 - 07:38 PM

wow, good suggestion. We will look into this :)