Working With wp_register_script()
Here is a brief introduction of registering scripts in WordPress and use them in your project.
WordPress is web software you can use to create a beautiful website or blog.
Here is a brief introduction of registering scripts in WordPress and use them in your project.
Want your WordPress installation to accept more types of files on upload? By default WordPress limits upload functionality to certain types of file but allows you to customize this functionality according to your needs. Here is how you can customize this functionality.
Don't want WordPress admin bar? Here is how to hide it by using WordPress hooks.
Many sites do use WordPress for blogging but they do not use it as back-end for whole site. (Your site or app may be one of them.) There may be a scenario in which you have to display recent posts from WordPress blog, on a page which is outside of WordPress. No problem. You might know that WordPress is quite flexible, hence you can handle such scenario with a small code. There are two ways to achieve this. You can either take advantage of WordPress loop itself or if you don't want to deal with WordPress loop then you can use other way also. If you don't want WordPress loop So you don't want to take advantage of WordPress loop? Then you can use wp_get_recent_posts(). According to WordPress codex: wp_get_recent_posts() will return a list of posts. Different from get_posts which returns an array of post objects. How to use it? Just copy paste following code in page where you want to list the Recent Posts include( 'wp-load.php' ); // Get the last 10 posts $recent_posts = wp_get_recent_posts( array( 'numberposts' => 10, 'post_type' => 'post', 'post_status' => 'publish', ) ); // Display them as list echo '<ul>'; foreach ( $recent_posts as $post ) { echo '<li><a href="', get_permalink( $post['ID'] ), '">', $post['post_title'], '</a></li>'; } echo '</ul>'; You can simply change numberposts parameters value to change the number of posts you want to retrieve.