Optimizing your WordPress site
One of the main tasks of people, who provide their platform for selling space for articles, it is important to do so, so that they are indexed quickly by all search engines.
Based on the knowledge I have acquired, I can say about website promotion, that articles are indexed the fastest, if the link to them is placed on the main page of the site. While communicating with foreign colleagues, I learned, what sites, whose home page is constantly changing, get a score when ranking much higher in the search engine google.
The following code will help you do more than just display new articles, like most plugins do WordPress, a display those articles that were last edited by the author. Based on this, posted links or posts, in articles will be noticed by search engines earlier. This means that in various automated link selling systems you will receive your money earlier..
The code must be inserted directly into the template.
Code snippet example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<?php $today = current_time('mysql', 1); $howMany = 5; if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_modified_gmt < '$today' ORDER BY post_modified_gmt DESC LIMIT $howMany")): ?> <h2><?php _e("Recent Updates"); ?></h2> <ul> <?php foreach ($recentposts as $post) { if ($post->post_title == '') $post->post_title = sprintf(__('Post #%s'), $post->ID); echo "<li><a href='".get_permalink($post->ID)."'>"; the_title(); echo '</a></li>'; } ?> </ul> <?php endif; ?> |
/*
- Basic web design course;
- Site layout;
- General course on CMS WordPress and continuation of the course on template development;
- Website development in PHP.