Skip to content

Instantly share code, notes, and snippets.

View asadaly111's full-sized avatar
🏠
Working from home

Asad Ali asadaly111

🏠
Working from home
View GitHub Profile
<?php echo get_option('home'); ?> <!-- get the home URL -->
<?php bloginfo('description'); ?> <!-- display the blog description -->
<?php bloginfo('name'); ?> <!-- display the blog name -->
<?php bloginfo('template_directory') ?> <!-- get the home URL for template's directory -->
<?php echo get_template_directory_uri(); ?>
<?php wp_list_pages('sort_order=desc&title_li='); ?> <!-- display the page list in descending order withour title -->
<?php wp_list_pages('sort_order=desc&depth=1&title_li='); ?> <!-- display the page list in descending order with "current_page_item" class
<?php wp_list_bookmarks(); ?> <!-- display the list of blogrolls -->
<?php echo date('Y'); ?>
@asadaly111
asadaly111 / woo-loop-image-wrap.php
Created September 20, 2018 22:09 — forked from krogsgard/woo-loop-image-wrap.php
WooCommerce insert wrapper around thumbnail images in loop
/* This snippet removes the action that inserts thumbnails to products in teh loop
* and re-adds the function customized with our wrapper in it.
* It applies to all archives with products.
*
* @original plugin: WooCommerce
* @author of snippet: Brian Krogsard
*/
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
/**