Support » Fixing WordPress » problem with short description on 930 pages

  • hello i have a little project in my university project. I have a site in which 903 pages have short description issue. If i handled them manually it will take time and resource too. please anyone can guide me to solve it at once i want to add three keywords at the start of each description. e.g online wordpress tutorial (descirption text). please help me i an waiting for your kind help. thanks in advance/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Well you can do it manually which obviously takes time. Or you could learn SQL and create a script to automatically insert the appropriate text in the correct table(s) of your WordPress database. But if the 3 words that are going to be inserted are going to be different on each post/page, you might as well do it manually as there’s no way to automate that.

    thanku sir

    is there no any way to make changes in the code like this
    <meta name=”description” content=”<?php if ( is_single() ) {
    single_post_title(”, true);
    } else {
    bloginfo(‘name’); echo ” – “; bloginfo(‘description’);
    }
    ?>” />
    to add 3 words at the start of description???

    Yes that approach could work. Are you using version control on your theme? Go ahead and try it – if it breaks, just roll back to the previous version.

    no i am not using version control on my theme

    can i handle it in header.php file or singlepost.php file?

    or use custom metas to decrease my time

    header.php is where it would need to go as that’s where that type of meta data is displayed (basically it’s where the <head> tag is).

    ok thanks but where i can solve the issue of posts because header.php shows
    <?php if(is_front_page()) { ?>
    <h2 id=”site-description”<?php if(!get_option(‘dp_site_description’)) echo ‘ class=”hidden”‘; ?>><?php bloginfo(‘description’); ?></h2>
    <?php } else { ?>
    <div id=”site-description”<?php if(!get_option(‘dp_site_description’)) echo ‘ class=”hidden”‘; ?>><?php bloginfo(‘description’); ?></div>
    <?php } ?>
    but where can i made changes according to posts
    where to access the code of wordpress posts?

    Well a lot depends on your theme and how its coded up. I would point you to codex.wordpress.org/Theme_Development for more information on themes and how they work.

    thanks a lot sir

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘problem with short description on 930 pages’ is closed to new replies.