Guest User

Untitled

a guest
Jan 20th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. // Get The Page ID You Need
  2. get_option( 'woocommerce_shop_page_id' );
  3. get_option( 'woocommerce_cart_page_id' );
  4. get_option( 'woocommerce_checkout_page_id' );
  5. get_option( 'woocommerce_pay_page_id' );
  6. get_option( 'woocommerce_thanks_page_id' );
  7. get_option( 'woocommerce_myaccount_page_id' );
  8. get_option( 'woocommerce_edit_address_page_id' );
  9. get_option( 'woocommerce_view_order_page_id' );
  10. get_option( 'woocommerce_terms_page_id' );
  11.  
  12. // An Example
  13. function get_shop_featured_image() {
  14. if( is_shop() ) {
  15. $shop = get_option( 'woocommerce_shop_page_id' );
  16. if( has_post_thumbnail( $shop ) ) {
  17. echo get_the_post_thumbnail( $shop );
  18. }
  19. }
  20. }
  21.  
  22. // In You Templage File Place The Following
  23. // Line To Call The WooCommerce Shop Featured Image
  24. // Now You're Cooking With Gas - BOOM!!
  25.  
  26. <?php get_shop_featured_image(); ?>
Add Comment
Please, Sign In to add comment