Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author oceanwp

    (@oceanwp)

    Hello, edit your page, in the Logo tab of OceanWP Settings, add your own logo in the Logo and Retina Logo fields.

    Thread Starter mauivang

    (@mauivang)

    Yes, I’ve done that. The different logo is still not showing when I pull up the mobile page. It just shows the main logo. Though, the desktop version it does show the different logo.

    • This reply was modified 5 years, 8 months ago by mauivang.
    Thread Starter mauivang

    (@mauivang)

    Here’s what I did to fix it (not the cleanest code, nor the most full proof, but it works for now). I changed the function to:

    function change_logo($html) {
    
       if(is_single() || is_home()){
          $html = preg_replace('/<img(.*?)\/>/', '<img src="https://mauivang.com/wp-content/uploads/2018/07/paradime_best.png" class="custom-logo" alt="" itemprop="logo" />', $html);
       }
       return $html;
    }
    
    //The first filter updates the logo on individual posts on desktop browser
    add_filter('get_custom_logo','change_logo');
    add_filter('ocean_responsive_logo', 'change_logo');

    This allowed my main blog page and all the posts to show a different logo than my regular static pages.

    • This reply was modified 5 years, 8 months ago by mauivang.
    • This reply was modified 5 years, 8 months ago by mauivang.
    Theme Author oceanwp

    (@oceanwp)

    Hi, if it work as you want, it is perfect 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom logo for specific pages on mobile’ is closed to new replies.