Archived

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

  • 0

Registering Sections

Question

Posted · Report post

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) );
	}
	

Share this post


Link to post
Share on other sites

1 answer to this question

Posted · Report post

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

Share this post


Link to post
Share on other sites