top of page

Create a Post Status Like Home Page in Backend

  • Writer: سُلَيْمَان بْن دَاوُوْد
    سُلَيْمَان بْن دَاوُوْد
  • Apr 22, 2022
  • 1 min read





/*Generic Page*/
add_filter('display_post_states', 'victoria_custom_post_states',10,2);

function victoria_custom_post_states( $states, $post ) {

    if ( ( 'page' == get_post_type( $post->ID ) )
        && ( 'templates/template-generic.php' == get_page_template_slug( $post->ID ) ) ) {

            $states[] = __('Generic Page');

    }

    return $states;
}


 
 
 

Recent Posts

See All
Duplicate Category in Wordpress

The following code helps to duplicate the default wordpress category by help of code. // Add Duplicate option for categories in WordPress...

 
 
 
C#.NET and Its Associated Codes

1- Creating an Desktop Application in C#.NET C# ADO.NET & MySQL MAIN C# and MySQL ADO.NET with Crystals Reports Ready Code 2- Handling...

 
 
 

Comments


© 2020 by syednazrulhassan

bottom of page