Skip to content

Instantly share code, notes, and snippets.

View ahmedeshaan's full-sized avatar

Ahmed Eshaan ahmedeshaan

View GitHub Profile
@ahmedeshaan
ahmedeshaan / command.md
Created September 29, 2016 05:50
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

  • sudo su

  • mysql -u root or mysqld_safe --skip-grant-tables

  • SELECT User,Host FROM mysql.user;

  • DROP USER 'root'@'localhost';

.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {min-height: 500px !important; margin-bottom:10px; }
ul.products li.product a.button {position: absolute !important; bottom: 500px; }
.box-text {
min-height: 145px;
position: relative;
}
.add-to-cart-button {
position: absolute;
top: 90px;
.flex-has-center .flex-col:not(.flex-center){
flex:1;
}
ul#menu-course-menu > .current_page_item > a {
color: #FCD137;
}
#menu-course-menu > .current_page_ancestor > a {
color: #FCD137;
}
ul#menu-course-menu > li ul li.current_page_item > a {
color: #FCD137;
function woocommerce_get_product_thumbnail( $size = 'shop_catalog', $deprecated1 = 0, $deprecated2 = 0 ) {
global $post;
$image_size = apply_filters( 'single_product_archive_thumbnail_size', $size );
if ( has_post_thumbnail() ) {
$props = wc_get_product_attachment_props( get_post_thumbnail_id(), $post );
return get_the_post_thumbnail( $post->ID, $image_size, array(
'title' => esc_attr(get_the_title()),
'alt' => esc_attr(get_the_title()),
) );
<?php
add_filter('gettext', 'translate_reply');
add_filter('ngettext', 'translate_reply');
function translate_reply($translated) {
$translated = str_ireplace('Be the first to review', 'Sé el primero en comentar', $translated);
return $translated;
}
// Or
<?php
add_filter('gettext', 'translate_reply');
add_filter('ngettext', 'translate_reply');
function translate_reply($translated) {
$translated = str_ireplace('Be the first to review', 'Sé el primero en comentar', $translated);
$translated = str_ireplace('There are no reviews yet', 'No hay comentarios aún', $translated);
// For More WooCommerce String Translation
//$translated = str_ireplace('english string', 'spanish string', $translated);
[ux_banner height="364px" bg="11" bg_overlay="rgba(255, 255, 255, 0.87)" bg_pos="80% 19%" parallax="2"]
[text_box text_color="dark"]
<h3 class="uppercase"><strong>Portfolio Element</strong></h3>
<p>Showcase work or other elements</p>
[divider width="67px" height="5px"]
<?php
[/text_box]
<?php
add_action('init', function(){
remove_filter( 'lostpassword_url', 'wc_lostpassword_url', 10, 1 );});
td[data-title="Shipping"]{max-width: 100px}
#eabi_postoffice_pickup_location {
width:270px !important;
}