Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * Add your own functions here. You can also copy some of the theme functions into this file.
- * Wordpress will use those functions instead of the original functions then.
- */
- // Bringt Widget Area in den Header neben das Logo
- add_action( 'ava_before_bottom_main_menu', 'enfold_customization_header_widget_area' );
- function enfold_customization_header_widget_area() {
- dynamic_sidebar( 'header' );
- }
- // remove default sorting dropdown in StoreFront Theme
- function avia_woocommerce_frontend_search_params()
- {
- return;
- }
- // Button Text beim bestellen
- add_filter( 'woocommerce_order_button_text', 'mmx_order_button_text' );
- function mmx_order_button_text() {
- return __( 'Kostenpflichtig bestellen', 'woocommerce' );
- }
- // remove related product on product site
- /*function avia_remove_related_product() {
- remove_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_output_related_products', 20);
- }
- add_action( 'init', 'avia_remove_related_product');*/
- // Titel auf Produktseite
- add_filter( 'avf_title_args', 'avf_product_titlee', 0, 2 );
- function avf_product_titlee( $args, $id ) {
- if ( is_singular('product') ) { $args['title'] = get_the_title($id); }
- return $args;
- }
- // add post type product
- add_action('ava_frontend_search_form','ava_frontend_search_form_mod');
- function ava_frontend_search_form_mod()
- {
- echo '<input type="hidden" name="post_type" value="product">';
- }
- add_action('woocommerce_after_add_to_cart_button','cmk_additional_button');
- function cmk_additional_button() {
- echo '<button class="popmake-3546" id="button-angebot" data-do-default="">Ja, bitte senden Sie mir ein Angebot zu!</button>';
- }
- add_filter( 'woocommerce_get_price_html', 'custom_price_message' );
- function custom_price_message( $price ) {
- $new_price = $price . ' <span class="custom-price-prefix">' . __('<br> >> JETZT ANSEHEN >>').'</span>';
- return $new_price;
- }
- add_filter( 'add_to_cart_text', 'woo_custom_single_add_to_cart_text' ); // < 2.1
- add_filter( 'woocommerce_product_single_add_to_cart_text', 'woo_custom_single_add_to_cart_text' ); // 2.1 +
- function woo_custom_single_add_to_cart_text() {
- return __( 'In den Warenkorb legen', 'woocommerce' );
- }
- function ava_woocommerce_after_cart_mod( ) {
- echo '<div class="after_cart"><span class="waren"><h3>Bequem und sicher bestellen</h3><br><h4><span style="color: #009900">✔</span> Bezahlung:</h4>Bequem auf Rechnung, PayPal, Sofortkauf oder Vorkasse<br><br><h4><span style="color: #009900">✔</span> Produktion:</h4>Sie erhalten vorab einen Korrekturabzug als PDF oder eine fertige Mustertasse.<br><br><h4><span style="color: #009900">✔</span> Lieferzeit:</h4>Wir brauchen ca. 5 Tage für die Produktion nach Druckfreigabe.</span></div>';
- };
- add_action ('woocommerce_after_cart', 'ava_woocommerce_after_cart_mod', 100, 0 );
- add_action( 'after_setup_theme', 'mmx_avia_woocommerce_settings' );
- function mmx_avia_woocommerce_settings(){
- global $avia_config;
- $avia_config['shop_single_column_items'] = 5;
- $avia_config['shop_single_column'] = 5;
- }
- add_action('init', 'avf_move_product_output');
- function avf_move_product_output() {
- remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
- remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 1 );
- add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 5 );
- }
- add_action( 'woocommerce_after_shop_loop_item', 'remove_add_to_cart_buttons', 1 );
- function remove_add_to_cart_buttons() {
- if( is_product_category() || is_shop()) {
- remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
- }
- }
- // Display 240 products per page. Goes in functions.php
- add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 240;' ), 20 );
- add_filter('comments_open','__return_false', 10, 2);
- /*add_action('ava_before_footer','avia_above_footer');
- function avia_above_footer(){
- dynamic_sidebar( 'above footer' );
- }*/
Advertisement
Add Comment
Please, Sign In to add comment