I use <?php the_date(); ?> to show a date of my recent post using query_posts, but it’s little bit of strange, coz not all that post showing a date. It’s showing a date but it’s random on the list of my recent post.
Then i use <?php echo get_the_date(); ?> and now in every single post on the list of my recent post is showing a date. Why is that?
/* Set up post type for Flexslider */
add_action( 'init', 'flexslider' );
function flexslider() {
register_post_type( 'flexslider_image',
array(
'labels' => array(
'name' => __( 'Flexslider Images' ),
'singular_name' => __( 'Flexslider Item' )
),
'public' => true,
'supports' => array('title', 'excerpt', 'thumbnail', 'custom-fields'),
)
);
}
With the release of WordPress 3.0, two great ways to better organize and display content were introduced: post types and taxonomies. These two advances improve WordPress’ role as an all-around content management system, and they continue to prove that WP is not just a blog platform. When 3.1 releases with post formats, it will be imperative that you understand how to use and implement post types and taxonomies.
Users can see version of WordPress you are running from readme.html file.
When WordPress version which is used in your blog is known, hacker can find proper exploit for exact version of WordPRess.
Remove readme.html file which is located in root folder of your blog.
NOTE: It will appear with next upgrade of WordPress.
Installation script is still available in your wordpress files.
Remove /wp-admin/install.php from your WordPress.
When WordPress version which is used in your blog is known, hacker can find proper exploit for exact version of WordPRess.
To remove WordPress version you should do two things:
- check if it’s not hardcoded in header.php or index.php of your current theme(search for ”)
- add few lines of code to functions.php in your current theme:
function no_generator() { return ''; } add_filter( 'the_generator', 'no_generator' );
Malicious URL requests are requests which may have SQL Injection inside and will allow hacker to broke your blog.
Paste the following code into a text file, and save it as blockbadqueries.php. Once done, upload it to your wp-content/plugins directory and activate it like any other plugins.
<?php /* Plugin Name: Block Bad Queries Plugin URI: http://perishablepress.com/press/2009/12/22/protect-wordpress-against-malicious-url-requests/ Description: Protect WordPress Against Malicious URL Requests Author URI: http://perishablepress.com/ Author: Perishable Press Version: 1.0 */ if (strpos($_SERVER['REQUEST_URI'], "eval(") || strpos($_SERVER['REQUEST_URI'], "CONCAT") || strpos($_SERVER['REQUEST_URI'], "UNION+SELECT") || strpos($_SERVER['REQUEST_URI'], "base64")) { @header("HTTP/1.1 400 Bad Request"); @header("Status: 400 Bad Request"); @header("Connection: Close"); @exit; } ?>
The majority of reported WordPress database security attacks were performed by exploiting SQL Injection vulnerabilities. By renaming the WordPress database table prefixes you are protecting your WordPress blog and website from zero day SQL injections attacks.
remove_action( $tag, $function_to_add, $priority, $accepted_args );
This function removes a function attached to a specified action hook. This method can be used to remove default functions attached to a specific action hook and possibly replace them with a substitute.
Important: To remove a hook, the
$function_to_removeand$priorityarguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure.
via: WP Codexy
The following syntax shows an excerpt, only a part of the output you can have in your theme. They result from the standard functions, which are loaded in the head of the theme. Visible, if you search in the file wp-includes/default-filters.php for the Hook wp_head. Not all filters should be deactivated, because in most cases they are useful. But WordPress is not only as classical blog in use and therefore some functions are not necessary.
<link rel="alternate" type="application/rss+xml" title="WP Engineer RSS Feed" href="http://wpengineer.com/feed/" />
<link rel="alternate" type="application/atom+xml" title="WP Engineer Atom Feed" href="http://wpengineer.com/feed/atom/" />
<link rel="pingback" href="http://wpengineer.com/blog/xmlrpc.php" />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://wpengineer.com/xmlrpc.php?rsd" />
<link rel='index' title='WP Engineer' href='http://wpengineer.com' />
<link rel='start' title='Use WordPress 2.7 Offline' href='http://wpengineer.com/use-wordpress-27-offline/' />
<link rel='prev' title='Recents Drafts All Authors' href='http://wpengineer.com/recents-drafts-all-authors/' />
This is an example, not a recommendation where some functions are deactivated. Check your header and turn off what you don’t need. Less markup and better loading time.
remove_action( 'wp_head', 'feed_links_extra', 3 ); // Display the links to the extra feeds such as category feeds
remove_action( 'wp_head', 'feed_links', 2 ); // Display the links to the general feeds: Post and Comment Feed
remove_action( 'wp_head', 'rsd_link' ); // Display the link to the Really Simple Discovery service endpoint, EditURI link
remove_action( 'wp_head', 'wlwmanifest_link' ); // Display the link to the Windows Live Writer manifest file.
remove_action( 'wp_head', 'index_rel_link' ); // index link
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // prev link
remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // start link
remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); // Display relational links for the posts adjacent to the current post.
remove_action( 'wp_head', 'wp_generator' ); // Display the XHTML generator that is generated on the wp_head hook, WP version
source: wpengineer
Ever thought you could make some improvements to your RSS feed? Like letting it cover more (or less!) content? Or adding some extra details onto the end of your posts?
All of this is going to take place in the functions.php file of your theme. If your theme doesn’t have one, just create a file in your theme’s folder with that name and let’s get to it! (Make sure all of this code goes between the opening tag in the file)
