Advertisement
Guest User

functions

a guest
Jan 24th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. <?php
  2. add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
  3. function my_theme_enqueue_styles() {
  4.  
  5. $parent_style = 'parent-style'; // This is 'tyche-style' for the Tyche theme.
  6.  
  7. wp_enqueue_style( $parent_style, get_template_directory_uri() . '/assets/css/style.css' );
  8. wp_enqueue_style( 'child-style',
  9. get_stylesheet_directory_uri() . './style.css',
  10. array( $parent_style ),
  11. wp_get_theme()->get('Version')
  12. );
  13. }
  14.  
  15. add_action('wp_head', 'hide_sidebar' );
  16. function hide_sidebar(){
  17. if(is_cart() || is_checkout()){
  18. ?><style type="text/css">
  19. #secondary {
  20. display: none;
  21. }
  22.  
  23. #primary {
  24. width:100%;}
  25. </style><?php
  26. }
  27. }
  28.  
  29. add_filter( 'woocommerce_checkout_fields', 'webendev_woocommerce_checkout_fields' );
  30. /**
  31. * Change Order Notes Placeholder Text - WooCommerce
  32. *
  33. */
  34. function webendev_woocommerce_checkout_fields( $fields ) {
  35.  
  36. $fields['order']['order_comments']['placeholder'] = 'Don&#8217;t worry about putting property access details here - we will email a property access form upon confirmation of your order.';
  37. return $fields;
  38. }
  39.  
  40. ?>
  41.  
  42. <?php
  43.  
  44. remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
  45. add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 0 );
  46.  
  47. // Override theme default specification for product # per row
  48. function loop_columns() {
  49. return 4; // 5 products per row
  50. }
  51. add_filter('loop_shop_columns', 'loop_columns', 999);
  52.  
  53.  
  54. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement