Jump to content
Sign in to follow this  
ricardo

Best way to hack pagelines_main_logo?

Recommended Posts

ricardo

Hi! On a multisite install, the logo on the second blog is lacking a trailing slash, which results in a 404 error on the main blog. I added a trailing slash to pagelines_main_logo in library.templates.php as a quick fix but would prefer to add a function or something to platform base's functions.php Any idea how to do it? Thanks in advance! Ricardo

Share this post


Link to post
Share on other sites
timlinson

Hi Ricardo, I'll flag this for the devs.

Share this post


Link to post
Share on other sites
cmunns

Use a filter...here is what the current function is with the associated filter hook ` $site_logo = sprintf( '%s', home_url(), get_bloginfo('name'), esc_url(pagelines_option('pagelines_custom_logo')), get_bloginfo('name')); echo apply_filters('pagelines_site_logo', $site_logo); ` Do you know how to use filters?

Share this post


Link to post
Share on other sites
ricardo

Hi Adam! I've tried everything I could think off but this always end the same way: either nothing happens or the changed code is inserted right on the top of the page, before the doctype declaration. Any idea what am I doing wrong? Thanks! Ricardo

Share this post


Link to post
Share on other sites
Simon

Hi, sorry with the late reply. Wordpress has a built in function just for this! `add_action ( 'pagelines_site_logo', 'simons_trailing_slash_function' );` `function simons_trailing_slash_function( $site_logo ) {` `$site_logo = sprintf( '%s', get_bloginfo('name'), esc_url(pagelines_option('pagelines_custom_logo')), get_bloginfo('name'));` `return $site_logo;` `}`

Share this post


Link to post
Share on other sites
ricardo

Thanks Simon! It works! I did exactly the same but failed in the end trying to use a filter related function instead of "return $site_logo;" Ricardo

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  

×