Posts

Showing posts from July, 2020

How to create ssh-rsa key or id_rsa key for first time in git?

Your first time with git and github Get a   github   account. Download and install   git. Set up git with your user name and email. Open a terminal/shell and type: $ git config --global user.name "Your name here" $ git config --global user.email "your_email@example.com" Run this command to create keygen $ ssh-keygen -t rsa -C "your_email@example.com" Run this command to print the rsa key and you can copy this key manually $ cat < ~/.ssh/id_rsa.pub Paste your ssh public key into your github account settings. Go to your github   Account Settings Click “SSH Keys” on the left. Click “Add SSH Key” on the right. Add a label (like “My laptop”) and paste the public key into the big text box. Done

Resolved - wordpress pagination adds extra slashes to url in post or category

I am working on blog where pagination is not working correct. All is working but when I click to the next page the url will get a extra slash in the URL, not sure why this is happening but when using the pagination a lot will add every time a new slash to the URL. URL Links are like this: mysite.com/blog/ , mysite.com/blog//page/2, mysite.com/blog///page/3, mysite.com/blog////page/4 You are using this code probably: ===============================  $total_pages = $loop->max_num_pages;     if ($total_pages > 1){         $current_page = max(1, get_query_var('paged'));         echo paginate_links(array(             'base' => get_pagenum_link(1) . '%_%',             'format' => '/page/%#%',             'current' => $current_page,             'total' => $total_pages,             'prev_text'    => __('« prev'),             'next_text'    => __('next »'),         ));     }    } ====

How to show product catalog in woocommerce based on date descending order?

You can show product catalog in woocommerce based on date descending order. For showing the product based on date descending order or asc order you have to use a filter in your child theme or current theme. Open funcation.php in your theme. You can find funcation.php in the root of your theme. Update this code and this code will replace the soft order of product to based on date descending order. -------------------- add_filter('woocommerce_default_catalog_orderby', 'custom_default_catalog_orderby');   function custom_default_catalog_orderby( $sort_by ) {     return 'date desc'; }

How to Show taxonomies terms on front as colorized or color circle checkboxes in woocommerce woocommerce-products-filter plugin?

Image
You can Show taxonomies terms on front as colorized or color circle checkboxes in woocommerce woocommerce-products-filter plugin? How to show circle instead of name of color in woocommerce woocommerce-products-filter plugin. If you want show color attributes color in circle you in woocommerce-products-filter plugin. You do not need buy an extension. Just do what i say: Open this folder wp-content/plugins/woocommerce-products-filter/views/html_types Open this file from above folder checkbox.php Go to line no 111 and 226. replace this line: echo $term['name']; TO           if($term['taxonomy']=='pa_color'){                             $ars = get_term_meta($term['term_id']);                             $colorp = $ars['color_value'][0];                             ?>                             <style type="text/css">                                 .pcirclecolor {                                     height: 30px;                  

How to get color code in woocommerce color attribute by slug in wordpress

You can get color code in wordpress woocommerce color attribute by slug in wordpress. You can use this code wordpress plugin woocommerce-products-filter also By using just simple code. First you need to get the $term['term_id']. This can be array Or object $term->term_id according to your page Use this code then for array: $color_code_array = get_term_meta($term['term_id']); $colorp = $color_code_array['color_value'][0]; // #000111 Use this code then for Object: $color_code_array = get_term_meta($term->term_id); $colorp = $color_code_array['color_value'][0]; // #000111 Now you print echo $colorp; // #000111

How to Rename additional information, description, reviews tab woocommerce in porto theme

Renaming Tabs Use the following snippet to rename tabs. You just create a child theme if you know how to create or just edit the current theme in function.php Add this code at the end /** * Rename product data tabs */ add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 ); function woo_rename_tabs( $tabs ) { $tabs['description']['title'] = __( 'More Information' ); // Rename the description tab $tabs['reviews']['title'] = __( 'Ratings' ); // Rename the reviews tab $tabs['additional_information']['title'] = __( 'Product Data' ); // Rename the additional information tab return $tabs; }

Themify WooCommerce Product Filter shows category disabled if we redirect a page then we choose another category we can not back to previous category.

Themify WooCommerce Product Filter shows category disabled if we redirect a page then we choose another category we can not back to previous category. To solve this problem. go to: /themify-wc-product-filter/includes/class-wpf-form.php Go to line no. 1111 Then replace this line $read_only = 'readonly'; to $read_only = ''; Themify WooCommerce Product Filter - now to enable the filter radio button when a category chooses.