Posts

WordPress Excerpts: How to Display a Read More link

Image
To prevent duplicate content, improve site load time, and for better SEO many bloggers have started to use post excerpts. Excerpts are mini-descriptions of the posts shown on the main blog page, category pages, and archive pages. You can see a live example by visiting any of our categories. But if you notice, our read more button is added on a separate line from the excerpt text. In this article, we will show you how to automatically add a read more link in WordPress Excerpts. First open your functions.php file, and paste the following code inside the php tags: 1 // Changing excerpt more 2     function   new_excerpt_more( $more ) { 3     global   $post ; 4     return   '… <a href="' . get_permalink( $post ->ID) .  '">'   .  'Read More &raquo;'   .  '</a>' ; 5     } 6     add_filter( 'excerpt_more' ,  'new_exce...

Fix: Customer Can't log in their account in Magento Store

Image
Source Image: www.huffingtongpost.com Following an upgrade to magento 1.8.1 on our development servers , we noticed that customers are unable to login to their account. The issue is raising because the custom login form does not contain any form_key and there is a form key validation happening in loginPostAction of Magento. Here is the solution: Go to template/customer/form/login.phtml and template/persistent/customer/form/login.phtml and under <ul class="form-list"> add the following code in the login form <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" /> Here is a screenshot: http://screencast.com/t/wOLw4OcONA If you are using the login form in different templates then you use add the form_key to the other parts as well. I hope this helps. – We are aware that this issue also exists while updating the qty of cart items, the sa...