Forum Replies Created

Viewing 15 replies - 1 through 15 (of 24 total)
  • @havingfun,

    In 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

    Try if the plugin has option to not cache pages for logged in users.

    Forum: Hacks
    In reply to: Sending email on post publish

    Try 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 );
    	}
    }
    ?>

    @seb-pame

    In 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.

    you 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.

    You 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.

    Why 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 wordpress

    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.

    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.

    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 this

    I 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()

    Hey 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.

    How to find page ID ?

    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 ??

    Just go to your footer.php(present in the theme folder) and your code just above the close body tag

    <?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.

Viewing 15 replies - 1 through 15 (of 24 total)