How register a custom shortcode for wordpress site?

Hello Friends! If you want to create a own custom shortcode in your wordpress website, then don’t worry just use my code. function my_function( $atts ) {      return “My Name is = {$atts[‘content’]}”; } add_shortcode(‘myname’, ‘my_function’); For register you new shortcode ,just need to add this code in your themes function.php file Your shortcode …

How reterive posts content from a specific category in wordpress website?

Hello Everyone! If you want to display the post lists from a specific category, then don’t worry i am here for you only. just use my code (given below) . For do this you have not require any technical knowledge, just copy and paste my code. <ul>        <?php           //        …

How delete a specific type of files from a directory/sub-directory using a single linux command?

Hello Everyone! If you want to remove the specific type of files from a directory/sub-directory using a single linux command, then just copy and paste my command code and before execute the command update the file suffix find . -type f -iname *file-suffix -exec rm -r {} \; Example: For a example if you want …

How to check user logged in or not in wordpress?

Hello Everyone! I am come back with a new information. If you are planning to set a different-2 custom message for registered and guest user then use my code given below : <?php if ( is_user_logged_in() )  { //go here when user is logged in //message for registered user     echo ‘Welcome, registered user!’; }  else  { //Go here when user not …