Adding Logo in WordPress -5
Step 1: Open admin panel
- Go to this page: http://localhost/[project-name]/wp-admin/
Step 2: Click on Appearance
- Open Appearance → Customize
- Click on the Site Identity section and click Add Logo.
- Upload a new image, or select one that’s already in your Media Library.
- Click Set as logo, and you’ll see your logo appear in the preview window.
Step 3: Code to View Logo in Front end
<?php
$logo = get_theme_mod(‘custom_logo’);
$image = wp_get_attachment_image_src($logo, ‘full’);
$image_url = $image[0];
?>
<a class=”navbar-brand” href=”<?php echo get_site_url(); ?>”>
<img src=”<?php echo $image_url; ?>”></a>
As a Beginner i’ve just stuck in this step…
One of your student(named Abhishek) suggested me your website for better learning Experience
And Your tutorial is really helpful
I’ll also suggest my friends