Jump to content
Sign in to follow this  
stereoscott

Registering Sections

Recommended Posts

stereoscott    0
stereoscott

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
Andrew    201
Andrew

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

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  

×