Amit_k
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: need to adjust sidebar widthIn your styles.css file you’ll find
.sidebar
change the width to whatever and make sure you reduce same from.content
file.Note – See this image, This’ll happen if you do increase the width of sidebar, thats because of you’re using a background image
Forum: Plugins
In reply to: [Hyper Cache] [Plugin: Hyper Cache] Still logged in after logging outTry if the plugin has option to not cache pages for logged in users.
Forum: Hacks
In reply to: Sending email on post publishTry this,
put in themes functions.php file<?php add_action( 'save_post', 'send_email' ); function send_email( $post_id ) { // lets check if post is not revision if ( !wp_is_post_revision( $post_id ) ) { $post_url = get_permalink( $post_id ); $subject = 'Image is approved'; $message = "Your image is approved:\n\n"; $message .= "<a href='". $post_url. "'>Click here to view</a>\n\n"; $email = get_post_meta($post_id, 'email') //sends email wp_mail($email, $subject, $message ); } } ?>
Forum: Plugins
In reply to: [QR Code Tag] [Plugin: QR Code Tag] Nice, but caching is brokenIn the header.php template between ‘<head></head>’ tags.
That question was asked for meta_description for posts , so I used the conditional tag to restrict the process to single posts only. If you want to add specific meta-description, keywords, titles for your posts, pages, category archives etc then use SEO for WordPress plugin by yoast.Forum: Plugins
In reply to: [QR Code Tag] [Plugin: QR Code Tag] Nice, but caching is brokenyou can use a simple line of code to add QR-CODE image to your post. So why you are using plugin? Just have to paste this code into wordpress loop, as the permalink is used we don’t have to worry about all things (Dennis explained it in detailed)
using some conditional statements you can restrict this from appearing on some kind of pages such as category,tags, etc.
<img src="https://chart.apis.google.com/chart?cht=qr&chs=100x100&chl=<?php the_permalink(); ?/>" width="150" height="150" alt="QR code" />
Above code worked fine. Who want more customization options then use “QR Code tag” this is best qr code plugin I saw on wordpress.
Forum: Plugins
In reply to: [ZonaW QR Codes] [Plugin: ZonaW QR Codes] not showing any codeYou should post the code within WordPress loop ! Not anywhere else.
Or If you want to use QR-CODE in sidebar(Show image in sidebar), create a text-widget and paste following JavaScript code into it.
<script type="text/javascript"> //<![CDATA[ var url=window.location.href; document.write("<img src=\"https://chart.apis.google.com/chart?cht=qr&chs=100x100&chl="+encodeURI(url)+"\" alt=\"qrcode\" />"); //]]> </script>
QR-CODE will be seen on All your posts/pages and index page. You can restrict this from appearing using some conditions.
Forum: Plugins
In reply to: [QR Code Widget] [Plugin: QR Code Widget] 2.0 on wp 3.1 – brokenWhy you guss need plugin to generate QR-CODES ?
It can be done by using a text widget in sidebar and using following java-script code to produce QR-Codes dynamically.
<script type="text/javascript"> //<![CDATA[ var url=window.location.href; document.write("<img src=\"https://chart.apis.google.com/chart?cht=qr&chs=100x100&chl="+encodeURI(url)+"\" alt=\"qrcode\" />"); //]]> </script>
Its so simple No need to use a plugin and tons of php scripts ??
source : use QR-CODE in wordpressForum: Fixing WordPress
In reply to: How to make blog lighter?See
1. You are loading 2 jQuery files ! I didn’t find any function in your website that required jQuery. Its useless 140 KB increase in your page size.
So first of all backup your header.php file and remove both jquery files. If your website’s functions are working properly then keep it else you can restore it from backup. There is no need of two Jquery files, remove one older version !
You can also use Google hosted Jquery files instead of using yours. They’ll load faster and also reduce your server load.
2. Combine your all images in one. You can combine images that required for your themes. Example : the facebook,twitter,rss icons – you are using 6 different images. so you are doing 6 http requests. so combine it in one using –CSS SPRITES Technique.
Forum: Fixing WordPress
In reply to: How to make blog lighter?I don’t think this is OK. 500 KB / page load is too much. My frend gets around 500 daily visits and he required only 4.5GB bandwidth per month.!
Use the cache plugins that I’ve mentioned in above response. Or hire any web-designer for optimizing your website.
Your site is making too many http requests. check your site stats – here see the number of request and size of the webpage !! Optimize your images and js files.
Forum: Fixing WordPress
In reply to: How to make blog lighter?Usually php codes generates more server load as each time user visits page, they have to execute complete code. But you can use cache technique to overcome this issue. This will dramatically reduce the server load.
According to me W3 total cache and WP super cache are best.
By the way how many daily visits you got?
Forum: Fixing WordPress
In reply to: How can I do thisI think your main page already have the title and date. only you want to show the read more link, Read these pages for more information
– How to use <!–more–> tag to show only some part of post on main page ?
– Know more about the_excerpt()Forum: Fixing WordPress
In reply to: Can you put categories on select pages and not all of themHey what exactly you want to do? You wanted to put list of categories in sidebar of one or two pages?
UPDATE :
Try to find such code in your themes sidebar.php<div class="widget widget_categories"> <h3>Categories</h3> <ul> <?php wp_list_categories(); ?> </ul> </div>
Above code will display a list of categories in sidebar. So you have to add a conditional statement so that the code will execute only in particular pages.
Include above code bewteen this :
if ( is_home(array(42,2,4))) { // put the code which shows the list of categorie here }
( 42,2,4 are page-ID’s on which you want to show list of categories.)
Thats it, it will show the list of categories only on three pages.
Forum: Fixing WordPress
In reply to: published page turns into 404?Hello,
Yes I also got the same issue when I designed a custom page template but did not created it through WordPress’s “Add new Page”. After that my issue was solved ??
Forum: Fixing WordPress
In reply to: Adding some lines of javascript just above the close body tag???Just go to your footer.php(present in the theme folder) and your code just above the close body tag
Forum: Fixing WordPress
In reply to: anyway to add meta description to post without plugin<?php if( is_single() ) { <meta name="description" content="<?php the_excerpt(); ?>" /> ?>
Above code will add meta description to posts only, This will show first 55 words If you are not writing excerpt manually, else it will show the content of excerpt field.