December 30, 2024
1 min read

Last item for wp_nav_menu

function.php
function add_last_nav_item( $items ) {
    $items .= sprintf(
        '<li class="nav__item social__icon">
   <figure class="icon__container">
     <div class="icon">
      <a href="51$s" target="_blank" class="social__link"><img src="%2$s/images/icon__facebook.svg"></a>
     </div>
     <div class="icon">
       <a href="%3$s" target="_blank" class="social__link"><img src="%2$s/images/icon__youtube.svg"></a> .
     </div>
   </figure>
  </li>',
        'https://www.facebook.com/Czysta-%C5%9Awiadomo%C5%9B%C4%87-%C5%9Awiat%C5%82o-i-Mi%C5%82o%C5%9B%C4%87pl-811435542275919/',
        get_template_directory_uri(),
        'https://www.youtube.com/channel/UCxxKwAW7JE6eCx3OjNcO6Yw/'
    );

    return $items;
}

add_filter( 'wp_nav_menu_items', 'add_last_nav_item' );

Leave a Reply

Your email address will not be published. Required fields are marked *

Create a new WordPress administrator via functions.php & FTP

Sometimes, you might need to create an administrator account in WordPress without being able to access the admin dashboard. This could be because you have lost access to your site’s admin panel or when troubleshooting a client’s website. In this tutorial, we will show you how to programmatically add a WordPress administrator account using the […]

WooCommerce Mostly used Shortcode

Most use shortcode for popular eCommerce plugin WooCommerce.

How to Implement Google Ads Conversion Tracking in WooCommerce

Learn how to add Google Ads tracking code to your WooCommerce thank you page effortlessly, without the need for plugins.

PHP

File manager for any website

You can install a File manager for any website you are working on. It simple file manager PHP script that made by Tiny File Manager

Web Development Project in mind?

if you looking for a web developer for paid contribution to your project I am available for work.

Mukto
Mukto

Click the button below to chat with me.