cedcommerce
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Woocommerce add to cartHi
Add following code in your theme’s functions.php file
and change the text according to your need.remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); add_action( 'woocommerce_after_shop_loop_item', 'cedcommerce_template_loop_add_to_cart', 10 ); function cedcommerce_template_loop_add_to_cart() { global $product; ?> <a class="button product_type_simple" href="<?php echo get_permalink($product->ID);?>" rel="nofollow">Your Name Here</a> <?php } add_filter( 'woocommerce_product_single_add_to_cart_text', 'cedcommerce_change_add_to_cart_text', 10 ,2); function cedcommerce_change_add_to_cart_text($cedcommerce_text) { $cedcommerce_text = 'Detail Page Name here'; return $cedcommerce_text; }Hope it will works
ThanksForum: Fixing WordPress
In reply to: Woocommerce checkout product picture sizeHi frostbitelt,
For adding delivering address on checkout page.
Follow the step :
1. Login to dashboard
2. Goto WooCommerce > Settings
3. Select Shipping Tab
4. Under Shipping option you can find a heading “Shipping Destination”
5. Select anyone option from first two option
6. Click on Save Changes button.Now go to checkout page and you can find the delivering address on checkout page.
For resizing the image add following css in your theme’s style.css file
.attachment-shop_single.wp-post-image { max-width: 50%; width: 100%; }Hope it will works
ThanksForum: Fixing WordPress
In reply to: Show table borders/centerHello , projectsentinel
may be this can help you please place this in style.css
/*For the table.*/ #maincontentcenter table { margin: 0 auto; border: 1px solid #ccc; } /*for div element within a table.*/ table tbody tr td .wp-caption { margin: 0 auto; } table tbody tr td { text-align: center; }Forum: Fixing WordPress
In reply to: Excluding post categories, even for sticky postsSorry there was a mistake in above code, please paste the below one instead of above
$args = array ( 'posts_per_page' => get_option( 'posts_per_page' ), 'paged' => max ( 1, get_query_var( 'paged' )), 'cat' => '-112', // slider category ); $wp_query = new WP_Query( $args ); if($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post(); if ( ! is_sticky( get_the_ID() ) && ! in_array( '112', wp_get_post_categories( get_the_ID() ) ) ): ?> // Post listing here(Post html) <?php else : ?> // Post listing here (Post html) <?php endif; endwhile; endif;?>Through this code you’ll be able to exclude the sticky and non-sticky post of a specific category.
Thanks
Forum: Fixing WordPress
In reply to: Menus and WidgetsHello truesarcasm
wordpress already provide awesome ways to create menus for your site so just go through the links which describes how to create menus in wordpress
https://codex.wordpress.org/WordPress_Menu_User_Guide
http://www.wpbeginner.com/beginners-guide/how-to-add-navigation-menu-in-wordpress-beginners-guide/
Hope this will help youForum: Fixing WordPress
In reply to: Automatically add Alt Tag to WordPress Image UploadsHello brennenlb
After doing some research i have got a solution for you ,so give it a try.Put the code below in your theme’s functions.php and try uploading againadd_action( 'add_attachment', 'ced_add_image_meta_data' ); function ced_add_image_meta_data( $attachment_ID ) { $filename = $_REQUEST['name']; // or get_post by ID $withoutExt = preg_replace('/\\.[^.\\s]{3,4}$/', '', $filename); $withoutExt = str_replace(array('-','_'), ' ', $withoutExt); $my_post = array( 'ID' => $attachment_ID, 'post_excerpt' => $withoutExt, // caption 'post_content' => $withoutExt, // description ); wp_update_post( $my_post ); // update alt text for post update_post_meta($attachment_ID, '_wp_attachment_image_alt', $withoutExt ); }Hope this time you will mark it resolved.
Forum: Fixing WordPress
In reply to: Main Menu seems unstable/disappears…HELP!!Hie Steve Keller,
Will you please be specific about your problem. I checked the website link you provided, everything is fine there.
ThanksForum: Fixing WordPress
In reply to: How to remove "edit" button at the bottomHi john8999,
Add following css in theme’s style.css file.page-id-197 #post-197, .page-id-197 #content .content-wrapper, .page-id-197 #content { padding-bottom: 0; } .page-id-197 .entry-footer { margin-top: 0; }It will remove the gap between social buttons and footers.
ThanksForum: Fixing WordPress
In reply to: Best plugin for Prev/Next buttons?Hello Please try to use https://wordpress.org/plugins/wp-pagenavi/ plugin for navigation buttons its simple to use and setup.
ThanksForum: Fixing WordPress
In reply to: How to link back to home page while on any other pageHello
It looks like you have deleted your home page.This is why you are getting this error please check your trashed page or recreate a home page for your site.
Thanks.Forum: Fixing WordPress
In reply to: Excluding post categories, even for sticky postsOh! I got your issue now, you can try the following code for your issue:
$args = array ( 'posts_per_page' => get_option( 'posts_per_page' ), 'paged' => max ( 1, get_query_var( 'paged' )), 'cat' => '-112', // slider category ); $wp_query = new WP_Query( $args ); if($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post(); if ( ! is_sticky( get_the_ID() ) ): ?> // Post listing here(Means the post listing html here) <?php endif; endwhile; endif;?>Through this code you’ll be able to exclude the sticky and non-sticky post of a specific category.
Hope this is what you want!
Forum: Fixing WordPress
In reply to: Hide price all productsHello pierremichaux
There is a plugin named “Hide Price Until Login” ,it has two features to hide prices(not only until login as name suggests) so you can give it a try.Here is the link https://wordpress.org/plugins/hide-price-until-login/Forum: Fixing WordPress
In reply to: Newbie in menus , please helpHello anespa,
Please go to the below given url
1) https://codex.wordpress.org/WordPress_Menu_User_Guide
2) https://codex.wordpress.org/Appearance_Menus_Screen
3) http://www.wpbeginner.com/beginners-guide/how-to-add-navigation-menu-in-wordpress-beginners-guide/
4) https://en.support.wordpress.com/menus/I hope it will help you.
Thanks
Forum: Fixing WordPress
In reply to: Email address not being recognized ?Hello wallstreetpro7,
If you are able to login into wordpress by your email account:
Write this code in functions.php with a different username and email ID:function add_admin_acct(){ $login = 'username'; $passw = 'passwrod'; $email = 'myacct1@mydomain.com'; if ( !username_exists( $login ) && !email_exists( $email ) ) { $user_id = wp_create_user( $login, $passw, $email ); $user = new WP_User( $user_id ); $user->set_role( 'administrator' ); } } add_action('init','add_admin_acct');After that login into your wordpress using your new username(or emailID) and password and change EmailID of your Account. Delete this code from functions.php
Forum: Fixing WordPress
In reply to: How to remove "edit" button at the bottomHello john8999,
Provide us your site url so that I can help you to remove the gap between social buttons and footers
Thanks