Help?! I will pay somebody!

Discussion in 'Web Design' started by wilhorse, Aug 10, 2013.

to remove all ads.
  1. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,670
    We don't disagree on that one AT ALL, and I would extend the range to many of the mass market hosting companies, (no names mentioned to protect the guilty.)
    But don't forget that the more 'plugins' you load into WP, performannce WILL suffer especially in a shared server environment where the provider will disregard server performance in favour of accounting performance.

    Also the likes of "SEO plugins" are unecessary because you can do exactly the same thing simply by using the WordPress 'Custom Fields' and writing a few extra functions for your chosen theme and calling them in 'the_loop' or the header template.
     
  2. wilhorse

    wilhorse New Member

    Messages:
    80
  3. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,670
    Read it direct from the source.
    http://codex.wordpress.org/Custom_Fields

    And to put in a custom meta description element into a post. you comment out
    PHP:
    <?php/* wp_head(); */?>
    the Wordpress fixed info code.

    And put in

    PHP:
    <?php $metadesc get_post_meta($post->ID'custdescript'true);
        if (
    $metadesc ){
            echo(
    '<meta name="description" content="'  .$metadesc .'" >');
        };
    instead

    And you can do the same [if you bother] for a meta keywords element.

    To create a field of 'custdescript' and fill in the details scroll to the bottom of the post editor. Once added, the field will appear for every post or page, no special 'plugin' needed.

    If you want to make it so that the WP fixed info appears if there is no custom description you do this:

    PHP:
    <?php $metadesc get_post_meta($post->ID'custdescript'true);
        if (
    $metadesc )
                {
            echo(
    '<meta name="description" content="'  .$metadesc .'" >');
                } else {
                    
    wp_head();
                }
        };
     
  4. wilhorse

    wilhorse New Member

    Messages:
    80
    Thank you, Chris!!! :)
     

Share This Page