How you change wordpress admin footer text

Sometimes you did not want to show default wordpress admin footer and want to replace with your text and logo. This example is for this purpose. So you can easily change wordpress admin footer without any big changes. You just need to copy paste below code in functions.php file.

//change the footer text

function custom_admin_footer_text () {
 echo '<img src="' . plugins_url( 'images/custom-icon.png' , __FILE__ ) . '">Dummy text goes here.';

add_filter( 'admin_footer_text', 'custom_admin_footer_text' );

How to get post details by post id

get_post retrieve post data by post id. This is wordpress function with 3 parameters.

<?php get_post( $id, $output, $filter ); ?> 

$id : Here you will pass id of the post you would like to get data.
$output : This is optional value. Default value is OBJECT
OBJECT – (default) returns a WP_Post object
ARRAY_A – Returns an associative array of field names to values
ARRAY_N – returns a numeric array of field values
$filter: This is also an optional. It filter the post.


$showpost=get_post( 2 );