wpgenie

add content to auction base page

Feb 7th, 2018 (edited)
735
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. /* this code snippet should go to your child theme's functions.php file */
  2. add_action('woocommerce_archive_description', 'wpgenie_custom_auction_page_content', 40);
  3.  
  4. function wpgenie_custom_auction_page_content(){
  5.     if(get_query_var('auction_arhive') == TRUE ){
  6.         if(!is_paged()){
  7.             $post_data = get_post(wc_get_page_id('auction'));
  8.             $the_content = apply_filters( 'the_content', $post_data->post_content ) ;
  9.             echo $the_content; 
  10.         }  
  11.     }
  12. }
Add Comment
Please, Sign In to add comment