Jump to content
Sign in to follow this  
michaeljohnprice

New default custom logo

Recommended Posts

michaeljohnprice

I'm working with Wordpress multisite and I'd like to filter the 'pagelines_custom_logo' array using the functions.php file in platformbase. The purpose is to add an image to the child theme's image folder and use that as the default custom logo. The specific lines I'm attempting to filter are located in the config.options.php file (lines 16-18):

		'pagelines_custom_logo' => array(
			'default' 	=> PL_IMAGES.'/logo-platformpro.png',
			'default_free'	=> PL_IMAGES.'/logo-platform.png',
	

I want to change it to refer to the CHILD_IMAGES folder using the filter so that my changes won't be lost in future updates. Any recommendations? I've gone through the discussions but haven't been able to implement the recommended solutions yet. Appreciate your help.

Share this post


Link to post
Share on other sites
Danny
Hi Michael, I spoke to one of the developers and he gave me this code: [code] add_action ( 'pagelines_site_logo', 'my_logo' ); function my_logo( $site_logo ) { $site_logo = sprintf( '%s', get_bloginfo('name'), esc_url(pagelines_option('pagelines_custom_logo')), get_bloginfo('name')); return $site_logo; } [/code]

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
michaeljohnprice
Thanks. I'll give it a shot.

Share this post


Link to post
Share on other sites
michaeljohnprice
That seems to allow me to change the link URL of the image but when I specified the image src, it didn't change source URL. Here's how I customized the code: [code] add_action ( 'pagelines_site_logo', 'qp_site_logo' ); function qp_site_logo( $site_logo ) { $site_logo = sprintf( '%s', get_bloginfo('name'), esc_url(pagelines_option('pagelines_custom_logo')), get_bloginfo('name')); return $site_logo; }[/code]

Share this post


Link to post
Share on other sites
michaeljohnprice
Ok...So I worked it out. Here's the solution: [code] add_action ( 'pagelines_site_logo', 'qp_site_logo' ); function qp_site_logo( $site_logo ) { $qp_logo_location = CHILD_IMAGES . '/logo-qpconnect-default.png'; $site_logo = sprintf( '%s', get_bloginfo('name'), esc_url($qp_logo_location), get_bloginfo('name')); return $site_logo; }[/code]

Share this post


Link to post
Share on other sites
michaeljohnprice
This will have to be a temporary fix because it no longer allows users to change the default logo. It's not dynamic yet. Will continue to hack.

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  

×