Jump to content
Sign in to follow this  
joie

How to fix undefined function

Recommended Posts

joie

How to fix this error : Call to undefined function pagelines_main_logo_no_link() in C:wampwwwgspreschoolwp-contentthemesplatformbasesectionssection.brandingnolink.php on line 35 I have the function body at section.brandingnolink.php Do I need to register it elsewhere thank you, regards, joie

Share this post


Link to post
Share on other sites
Rob

Joie, Please provide a link to your site and could you explain more about when that error occurred and what you were doing or trying to do when it happened? Thanks.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
joie

this is a development site. May be I post a copy of my custom section its called section.bannernolink.php <?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 without any links. Good for Landing Pages.', 'icon' => CHILD_IMAGES . '/store-label.png' ); parent::__construct($name, $id, $settings); } function section_template() { ?>

<?php pagelines_main_logo_no_link();?> <?php pagelines_register_hook( 'pagelines_before_brandingnolink_icons', 'brandingnolink' );?>
<?php pagelines_register_hook( 'pagelines_after_brandingnolink_wrap', 'brandingnolink' );?> <?php } function section_head(){} function section_scripts() {} function section_options() { } function pagelines_main_logo_no_link(){ if(pagelines_option('pagelines_custom_logo')){ $site_logo = sprintf( '%s', 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 */

Share this post


Link to post
Share on other sites
joie

What I did was copy section.branding.php from platformpro to platformbase Then I rename it as section.brandingnolink.php and edit the code within I have register the section in platformbase function.php as pagelines_register_section('BaseBrandingNoLink', 'brandingnolink', null, array('child' => true) ); the body of function pagelines_main_logo_no_link() is basically copying the content of template.branding.php and then deleting the code that contains the link.

Share this post


Link to post
Share on other sites
joie

Not yet Kate, I was explaining the steps that I did if I call to the function then i am having error

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  

×