joie 4 Report post Posted August 15, 2011 I am creating a custom section : branding without any link / social icons here are the steps taken 1. copy section.branding.php from platform pro to platformbase 2. rename the copy as section.brandingnolink.php 3. register the section in platformbase function.php as pagelines_register_section('BaseBrandingNoLink', 'brandingnolink', null, array('child' => true) ); 4. the section.brandingnolink.php as follow : <?php /* Section: Branding No Link Author: Joie Hadi Nata Description: Shows the main site logo or the site title and description Without Link. To be used for landing pages Version: 1.0.0 */ class BaseBrandingNoLink extends PageLinesSection { function __construct( $registered_settings = array() ) { $name = __('Site Branding No Link', 'pagelines'); $id = 'brandingnolink'; $settings = array( 'type' => 'header', 'workswith' => array('header'), 'description' => 'Shows the main site logo or the site title and description.', 'icon' => CHILD_IMAGES . '/store-label.png' ); parent::__construct($name, $id, $settings); } // joie : overriden the template function section_template() { <?php pagelines_main_logo_no_link(); ?> <?php pagelines_register_hook( 'pagelines_before_branding_icons', 'brandingnolink' ); // Hook ?> <?php pagelines_register_hook( 'pagelines_after_branding_wrap', 'brandingnolink' ); // Hook ?> } function section_head(){} function section_scripts() {} function section_options() { } function pagelines_main_logo_no_link(){ if(pagelines_option('pagelines_custom_logo')){ $site_logo = sprintf( '', esc_url(pagelines_option('pagelines_custom_logo')), get_bloginfo('name')); echo apply_filters('pagelines_site_logo', $site_logo); } else { $site_title = sprintf( '%s', get_bloginfo('name')); echo apply_filters('pagelines_site_title', $site_title); } } } /* End of section class */ I have a php error that says Parse error: syntax error, unexpected '<' on the section.brandingnolink.php on line 35 which corresponds to the line : of the function section_template() I am new to php so i dont quite understand when to use the <?php tag Can anyone help? thank you, regards, joie Share this post Link to post Share on other sites
joie 4 Report post Posted August 15, 2011 the original section.branding.php uses this function call get_template_part( 'template.branding' ); so what i did was open the template.branding.php and copy the relevant code block into the new section_template() Share this post Link to post Share on other sites