You are viewing an old revision of this post, from September 2, 2015 @ 13:55:39. See below for differences between this version and the current revision.

How To Get WooCommerce Page IDs

Seen in this Gist: https://gist.github.com/Bradley-D/7287723   [php] // Get The Page ID You Need get_option( 'woocommerce_shop_page_id' ); get_option( 'woocommerce_cart_page_id' ); get_option( 'woocommerce_checkout_page_id' ); get_option( 'woocommerce_pay_page_id' ); get_option( 'woocommerce_thanks_page_id' ); get_option( 'woocommerce_myaccount_page_id' ); get_option( 'woocommerce_edit_address_page_id' ); get_option( 'woocommerce_view_order_page_id' ); get_option( 'woocommerce_terms_page_id' ); // An Example function get_shop_featured_image() { if( is_shop() ) { $shop = get_option( 'woocommerce_shop_page_id' ); if( has_post_thumbnail( $shop ) ) { echo get_the_post_thumbnail( $shop ); } } } // In You Templage File Place The Following // Line To Call The WooCommerce Shop Featured Image // Now You're Cooking With Gas - BOOM!! [/php]    

Revisions

  • September 2, 2015 @ 13:55:39 [Current Revision] by PeterLugg
  • September 2, 2015 @ 13:55:39 by PeterLugg

Revision Differences

There are no differences between the September 2, 2015 @ 13:55:39 revision and the current revision. (Maybe only post meta information was changed.)

Tags:

No comments yet.

Leave a Reply