Get Permalink by Page title or slug

Usually we grab a page Permalink through page ID but sometimes we had a case to grab Permalink through Page Slug or Page Title, So Below are the easiest way to grab the permalink for a page through page title or page slug.

 get_permalink( get_page_by_path( 'case-studies' ) );  
 get_permalink( get_page_by_title( 'Case Studies' ) );

How to remove Page Title at the shop page Storefront Woocommerce

To remove Page Title from the woocommerce main(shop) page with storefront theme you need to add following code in functions.php.

   function hide_shop_page_title() {
      return false;
  }
  add_filter( 'woocommerce_show_page_title' , 'hide_shop_page_title' );

How to remove Storefront sticky add to cart from Single Product Page

New Storefront theme have sticky add to cart on Single Product Page enabled by default if you want to remove this you just need to add below code in your functions.php.

remove_action( 'storefront_after_footer', 'storefront_sticky_single_add_to_cart', 999 );

How to Add top bar to Storefront before the header

Storefront don’t have a top bar by default, By adding simple snippet to the theme’s functions.php you can add a Top bar to Storefront theme before the header.

/**
 * Adds a top bar to Storefront, before the header.
 */
function storefront_top_bar() {
 
$html = '
<div id="topbar">';
$html .= '
<div class="col-full">';
 
$html = 'You can add your content here...';
$html = '</div>
;'
}
add_action( 'storefront_before_header', 'storefront_top_bar' );
</div>

Add/Remove Google Fonts from Woocommerce Storefront Theme

Woocommerce Storefront theme has Google fonts into the theme by default. But we still could easily add/remove their google fonts from from child theme, by adding snippet to the child theme functions.php.

// Remove Google Font from Storefront theme
function remove_fonts_from_child_styles(){
wp_dequeue_style('storefront-fonts');
}
add_action( 'wp_enqueue_scripts', 'remove_fonts_from_child_styles', 999);

You can easily add google fonts to storefront child theme y adding simple snipped to child theme’s functions.php.

// add google font to storefront theme
add_filter( 'storefront_google_font_families', 'add_google_font_to_storefront' );
function add_google_font_to_storefront( $family ) {
$family['roboto'] = 'Roboto:300,400,600';
return $family;
}