Forum Replies Created

Viewing 15 posts - 1 through 15 (of 21 total)
  • in reply to: Neighborhood blog page 2 link broken. 404 error #107391
    icr8
    Member
    Post count: 27

    Thanks mohammad! That works!!

    Much appreciated 🙂

    in reply to: Neighborhood blog page 2 link broken. 404 error #106945
    icr8
    Member
    Post count: 27

    Hi Laranz,

    Thanks for the feedback. I tried changing the permalink settings and indeed it did work, however this is not a suitable fix.

    I cannot have my links change to a structure like http://www.mywebsite.com/?p=123 because it’s not search engine friendly, and would invalidate any of the links to the website that we’ve already published on social media and in printed materials.

    I should also point out that the live preview of the neighborhood theme at neighborhood.swiftideas.net appears to use a “post name” permalink structure, and not the default. However the pagination works fine in the blog.

    The correct operation of the blog pagination should not be dependent on using a poor permalink structure. Is there another way to fix this? I do not mind waiting for another theme update as long as the fix works properly with my current permalink structure.

    Thanks.

    in reply to: Neighborhood blog page 2 link broken. 404 error #106842
    icr8
    Member
    Post count: 27
    This reply has been marked as private.
    in reply to: Neighborhood blog page 2 link broken. 404 error #106541
    icr8
    Member
    Post count: 27
    This reply has been marked as private.
    in reply to: Facebook Sharing for Products ( No Pic ) #37773
    icr8
    Member
    Post count: 27

    Has anybody tried this solution yet? And did it work for you?..

    in reply to: Facebook Sharing for Products ( No Pic ) #37153
    icr8
    Member
    Post count: 27

    Hello Gys,

    Sorry for the late response. I have been travelling. First Berlin, then London and Now i’m in Africa.

    I will tell you the solution I have, but beware I haven’t finished testing it yet.

    RATIONALE
    The facebook share API pulls the information it uses from Open graph tags (or OG tags). Currently, the theme doesn’t have all the tags it requires, so it does its best to pull whatever info it can find, hence the jibberish in the product description.

    You can find info about OG tag best practices here https://developers.facebook.com/docs/plugins/checklist/#opengraphtags

    Given this info, I set about trying to add the OG meta tags into the page without changing too many files. The main goal is to pass the product description and encapsulate it in the og:description tag. OG tags are meta tags which have to be included within the head tag. In the neighborhood theme, this is located in the header.php file, so that’s where it needs to be changed. Here’s how I did it.

    Inserting product description into OG tag for facebook
    1. If you haven’t done so already, you need to install the neighborhood child theme or create a child theme yourself. (Info on how to do that is here).
    2. Copy the header.php file from wp-contents/themes/neighborhood into your child theme file, located at wp-contents/themes/name-of-your-theme
    3. In your child theme’s header.php file, locate the section for meta tags in the header. (see attached image). It should be under the following html comment

    <!--// SITE META //-->

    4. Under the content there, and before the next section which should be pingback and favicon, add the following code.

    <!--// ADDING OG TAG META FOR FACEBOOK SHARE//-->
    
    <?php if (have_posts()):while(have_posts()):the_post(); endwhile; endif;?>  
    
    <!-- Set the values here if you have registered your site as a facebook app. If not, you don't need the two lines below -->  
    <meta property="fb:app_id" content="226492710858523" />  
    <meta property="fb:admins" content="512510627" />
      
    <!-- Checks if page is a content page or  a product page -->  
    <?php if (is_single()) { ?>  
    <meta property="og:url" content="<?php the_permalink() ?>"/>  
    <meta property="og:title" content="<?php single_post_title(''); ?>" /> 
     
    <?php if (is_product()){ ?>
    
    <meta property="og:description" content="<?php echo get_post_meta($post->ID, 'sf_product_description', true); ?>" /> 
     <?php } else { ?>  
    <meta property="og:description" content="<?php echo strip_tags(get_the_excerpt($post->ID)); ?>" />  <?php } ?>
    <meta property="og:type" content="article" />  
    <meta property="og:image" content="<?php if (function_exists('wp_get_attachment_thumb_url')) {echo wp_get_attachment_thumb_url(get_post_thumbnail_id($post->ID)); }?>" />  
    
    <!-- if page is others -->  
    <?php } else { ?>  
    <meta property="og:site_name" content="<?php bloginfo('name'); ?>" />  
    <meta property="og:description" content="<?php bloginfo('description'); ?>" />  
    <meta property="og:type" content="website" />  
    <meta property="og:image" content="logo.jpg" /> <?php } ?>

    5. Save the file, delete your cache and refresh your product page. Test to check the tags are being inputted correctly by looking in the source code of your product page.

    Now, you should note that Facebook only scrapes your website every 24 hours! So if you test the share button from your website, it may not look like it’s working, even though the OG tags are being outputted in the source code. This is because facebook hasn’t scraped your site since the update.

    6. To force facebook to scrape a page and test if the sharer will work correctly, use the Debugger Tool, provided by facebook here. Just copy and paste the url of your product page, and you can see what info they are pulling. IF something looks wrong, try deleting your cache and checking the head section of the page’s source to make sure the tags and description is correct in there. Then try thr debug tool again.

    7. Now for the product you tested in the debug tool, go to the product page and try the facebook share button again. This time, the correct description should be there.

    Now you just have to wait 24 hours for facebook to scrape your whole site.

    VARIATION
    – Some of you may only have a product short description and not a full description. In that case you need to pull the short desc instead of the full desc from the database. You do this by changing this line of code
    <meta property="og:description" content="<?php echo get_post_meta($post->ID, 'sf_product_description', true); ?>" />

    to this
    <meta property="og:description" content="<?php echo get_post_meta($post->ID, 'sf_short_product_description', true); ?>" />

    – Also, if you prefer to type a single constant message instead of product descriptions, you can do it by putting the message directly in the content attribute of the og:description meta tag. e.g.

    <meta property="og:description" content="Look at what i just found at someamazingsite.com" />

    I hope this helps you guys. Let me know if you have any success with it. ANd if it doesn’t work for you, let me know and i’ll try my best to help you figure out why.


    @swiftideas
    It would be cool if you guys could add this feature to future updates, so people don’t have to do this manually

    Good luck with it guys!! 🙂

    in reply to: Facebook Sharing for Products ( No Pic ) #36155
    icr8
    Member
    Post count: 27

    The nextgen plugin did not work for me either, but I have worked out a solution!!!

    Will post it here shortly…

    in reply to: Facebook Sharing for Products ( No Pic ) #34969
    icr8
    Member
    Post count: 27

    Hey guys,

    I am not part of the support team but I have nearly fixed the issue and will share my solution when done 🙂

    in reply to: login / register form #34591
    icr8
    Member
    Post count: 27

    I’ve figured out a workaround… I hope this helps you guys. Let me know if it does or doesn’t work for you…

    STEP 1
    Add the code below into your CHILD THEME’s functions.php file. It includes the function that saves the user’s first and last name into the database.

    //Validation registration form  after submission using the filter registration_errors
    add_filter('registration_errors', 'registration_errors_validation', 10,3);
    function registration_errors_validation($reg_errors, $sanitized_user_login, $user_email) {
    		global $woocommerce;
    		extract($_POST); // extracting $_POST into separate variables
    		if(($firstname == '' ) || ($lastname == '' )) {
    			$woocommerce->add_error( __( 'Please, fill in all the required fields.', 'woocommerce' ) );
    		}
    
    		return $reg_errors;
    }
    
    //Updating use meta after registration successful registration
    add_action('woocommerce_created_customer','adding_extra_reg_fields');
    
    function adding_extra_reg_fields($user_id) {
    	extract($_POST);
    	update_user_meta($user_id, 'first_name', $firstname);
    update_user_meta($user_id, 'last_name', $lastname);
    
            // can also do multiple fields like that
            update_user_meta($user_id, 'first_name', $firstname);
    	update_user_meta($user_id, 'billing_first_name', $firstname);
    	update_user_meta($user_id, 'shipping_first_name', $firstname);
    update_user_meta($user_id, 'last_name', $lastname);
    	update_user_meta($user_id, 'billing_last_name', $lastname);
    	update_user_meta($user_id, 'shipping_last_name', $lastname);
    	}

    STEP 2
    Using your FTP client or hosting server’s file manager, create a “woocommerce” folder in your child theme directory. Open the woocommerce folder you just created, and add a new folder named “myaccount”. The final directory path should look something like this: wp-content/themes/your-child-theme/woocommerce/myaccount/

    STEP 3
    Inside the wp-content/themes/your-child-theme/woocommerce/myaccount/ directory, create a php file and name it “form-login.php”.

    STEP 4
    In the form-login.php file you just created, paste in the following code which adds the user’s first name and last name to the registration form.

    <?php
    /**
     * Login Form
     *
     * @author 		WooThemes
     * @package 	WooCommerce/Templates
     * @version     1.6.4
     */
    
    if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    
    global $woocommerce;
    
    $options = get_option('sf_neighborhood_options');
    
    ?>
    
    <?php $woocommerce->show_messages(); ?>
    
    <?php do_action('woocommerce_before_customer_login_form'); ?>
    
    <div class="my-account-login-wrap">
    	
    	<div class="col2-set" id="customer_login">
    	
    		<div class="col-1">
    	
    			<div class="login-wrap">
    				<h4 class="lined-heading"><span><?php _e( 'Registered customers', 'swiftframework' ); ?></span></h4>
    				<form method="post" class="login">
    					<p class="form-row form-row-first">
    						<label for="username"><?php _e( 'Username or email', 'woocommerce' ); ?> <span class="required">*</span></label>
    						<input type="text" class="input-text" name="username" id="username" />
    					</p>
    					<p class="form-row form-row-last">
    						<label for="password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
    						<input class="input-text" type="password" name="password" id="password" />
    					</p>
    					<div class="clear"></div>
    		
    					<p class="form-row">
    						<?php $woocommerce->nonce_field('login', 'login') ?>
    						<input type="submit" class="button" name="login" value="<?php _e( 'Login', 'woocommerce' ); ?>" />
    						<a class="lost_password" href="<?php
    		
    						$lost_password_page_id = woocommerce_get_page_id( 'lost_password' );
    		
    						if ( $lost_password_page_id )
    							echo esc_url( get_permalink( $lost_password_page_id ) );
    						else
    							echo esc_url( wp_lostpassword_url( home_url() ) );
    		
    						?>"><?php _e( 'Lost Password?', 'woocommerce' ); ?></a>
    					</p>
    				</form>
    			</div>
    			
    		</div>
    	
    		<?php if (get_option('woocommerce_enable_myaccount_registration')=='yes') : ?>
    	
    		<div class="col-2">
    	
    			<h4 class="lined-heading"><span><?php _e( 'Not registered? No problem', 'swiftframework' ); ?></span></h4>
    			
    			<div class="new-user-text"><?php echo $options['checkout_new_account_text']; ?></div>
    			
    			<a class="sf-roll-button alt-button create-account-button" href="#create-account" data-toggle="modal"><span><?php _e('Create an account', 'swiftframework'); ?></span><span><?php _e('Create an account', 'swiftframework'); ?></span></a>
    			
    			<form method="post" class="register">
    				
    				<div id="create-account" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="create-account-modal" aria-hidden="true">
    					<div class="modal-header">
    						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    						<h3 id="create-account-modal"><?php _e("Register", "swiftframework"); ?></h3>
    					</div>
    					<div class="modal-body">
    				
    						<?php if ( get_option( 'woocommerce_registration_email_for_username' ) == 'no' ) : ?>
    			
    							<p class="form-row form-row-first">
    								<label for="reg_username"><?php _e( 'Username', 'woocommerce' ); ?> <span class="required">*</span></label>
    								<input type="text" class="input-text" name="username" id="reg_username" value="<?php if (isset($_POST['username'])) echo esc_attr($_POST['username']); ?>" />
    							</p>
    			
    							<p class="form-row form-row-last">
    			
    						<?php else : ?>
    			
    							<p class="form-row form-row-wide">
    			
    						<?php endif; ?>
    <!-- Start of code that adds first and last name to the forms -->							
    <div class="form-row form-row-wide"><label for="reg_firstname"><?php _e('First Name', 'woocommerce' ); ?> <span class="required">*</span></label>
    <input type="text" class="input-text" name="firstname" id="reg_firstname" size="40" value="<?php if (isset($_POST['firstname'])) echo esc_attr($_POST['firstname']); ?>"/></div>
    
    <div class="form-row form-row-wide"><label for="reg_lastname"><?php _e('Last Name', 'woocommerce'); ?> <span class="required">*</span></label>
    <input type="text" class="input-text" name="lastname" id="reg_lastname" size="40" value="<?php if (isset($_POST['lastname'])) echo esc_attr($_POST['lastname']); ?>" /></div>
    <div class="form-row form-row-wide">
    <!-- End of code that adds first and last name to the forms, but also added a close div after the email section below for formatting purposes -->
    							<label for="reg_email"><?php _e( 'Email', 'woocommerce' ); ?> <span class="required">*</span></label>
    							<input type="email" class="input-text" name="email" id="reg_email" value="<?php if (isset($_POST['email'])) echo esc_attr($_POST['email']); ?>" /></div>
    						</p>
    			
    						<div class="clear"></div>
    			
    						<p class="form-row form-row-first">
    							<label for="reg_password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
    							<input type="password" class="input-text" name="password" id="reg_password" value="<?php if (isset($_POST['password'])) echo esc_attr($_POST['password']); ?>" />
    						</p>
    						<p class="form-row form-row-last">
    							<label for="reg_password2"><?php _e( 'Re-enter password', 'woocommerce' ); ?> <span class="required">*</span></label>
    							<input type="password" class="input-text" name="password2" id="reg_password2" value="<?php if (isset($_POST['password2'])) echo esc_attr($_POST['password2']); ?>" />
    						</p>
    						<div class="clear"></div>
    			
    						<!-- Spam Trap -->
    						<div style="left:-999em; position:absolute;"><label for="trap">Anti-spam</label><input type="text" name="email_2" id="trap" tabindex="-1" /></div>
    	
    						<?php do_action( 'register_form' ); ?>
    						
    						<?php $woocommerce->nonce_field('register', 'register') ?>
    						<input type="submit" class="button" name="register" value="<?php _e( 'Register', 'woocommerce' ); ?>" />
    											
    					</div>
    				</div>
    			</form>
    	
    		</div>
    		
    		<?php endif; ?>
    		
    	</div>
    
    </div>
    
    <?php do_action('woocommerce_after_customer_login_form'); ?>

    <hl>
    What this does is include the first and last name fields during registration, and saves them to the corresponding fields in the user’s shipping and billing address. Obviously you should be able to follow the pattern and include the other fields as well, such as address, postcode, etc.

    I really hope this helps. Let me know if it works for you!!

    in reply to: login / register form #34576
    icr8
    Member
    Post count: 27

    I also need to add more fields for new customers to provide more information during registration. At the very, least they should be able to enter an address to register.

    At the moment, there isn’t enough information, no option to include a captcha to avoid bots setting up multiple accounts, and also no way for the user to confirm their email address before the account is activated.

    I can totally understand if @swiftideas is unable to implement this feature, but it would be useful to know what files need to be changed and how to change them, so we do it ourselves…

    In the meantime, I will keep looking for a solution to this issue and update this thread if I find one.

    in reply to: Revolution slider Jquery error #34565
    icr8
    Member
    Post count: 27

    Hello Ed,

    I played around and managed to fix it. Not entirely sure how… I was looking at the theme php files trying to pinpoint where the extra script tag was coming from. Then on the “home” page, i enabled the swift slider, and then later I disabled it again and it seems to be working!

    Random… But at least it works now.

    Thanks for all your help!!

    in reply to: Revolution slider Jquery error #34562
    icr8
    Member
    Post count: 27
    This reply has been marked as private.
    in reply to: Revolution slider Jquery error #34560
    icr8
    Member
    Post count: 27

    Hello Ed,

    The problem persist 🙁

    It says…

    Revolution Slider Error: You have some jquery.js library include that comes after the revolution files js include.
    This includes make eliminates the revolution slider libraries, and make it not work.

    To fix it you can:
    1. In the Slider Settings -> Troubleshooting set option: Put JS Includes To Body option to true.
    2. Find the double jquery.js include and remove it.

    I just need to find how the theme is putting in the extra include, and I can fix it. I still haven’t found it, but if you have any suggestions perhaps I can figure it out

    in reply to: Revolution slider Jquery error #34498
    icr8
    Member
    Post count: 27
    This reply has been marked as private.
    in reply to: Revolution slider Jquery error #34496
    icr8
    Member
    Post count: 27

    Hello Ed.

    I am using wordpress version 3.7.1

    I also checked and I’m only using the plugins that come with the theme. (See attached image)

    All I did was install the theme, customise some of the theme settings, and imported a sample revolution slider as a template for my slider.

    I will send you the login details in a private message so you can take a look….

Viewing 15 posts - 1 through 15 (of 21 total)