How to Disable Right Click on wordpress Dashboard(Admin Area)

Use the selector .wp-admin to make sure you are selecting only the wordpress admin area. html body.wp-admin { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } The code above will prevent the user from selecting/highlighting the page content. If you really want to disable right click, just use a simple JS code like: <script> … Read more

How to echo a PHP Code After the Content

You can try my approach which is used to do your requirement: function themename_your_content_after($content) { if( is_single() ): ob_start(); ?> <div class=”css”> <?php if ( should_display_link() ) : ?> [subscribe-author-button] <?php echo ‘<a class=”btn” style=”background-color:#1f1fff; border-radius:100px;” href=”‘.site_url(‘chat/’).’?new-message&to=’.get_the_author_meta( ‘user_login’ ).'”>Chat</a>’ ; ?> <?php endif; ?> [simple-author-box] <?php if ($post->post_status == “publish”) { ?> <h4>[post-views]</h4> <?php } … Read more

WordPress eMails not working

Check if youre WP can send out any emails to begin with : https://wordpress.org/plugins/check-email/ is a good one to try. If you have trouble sending emails with the standard setup you could also try https://wordpress.org/plugins/wp-mail-smtp/#description and use Gmail or a 3rd party SMTP service to send email. This plugin also has fairly advanced debugging options … Read more

Changing author slug for a custom role without using plugin

You can use add_permastruct() (with ep_mask set to EP_AUTHORS) to add the proper rewrite rules, and the author_link filter to set the proper author URL: add_action( ‘init’, function(){ add_permastruct( ‘%author_trip_vendor%’, ‘operator/%author%’, [ ‘ep_mask’ => EP_AUTHORS, ] ); } ); add_filter( ‘author_link’, function( $link, $author_id, $author_nicename ){ if ( user_can( $author_id, ‘trip_vendor’ ) ) { $link … Read more

Fatal error: Uncaught Error: Call to undefined function

In your code there’s this part: test(); ob_start(); wp_list_categories($atts); $output = ob_get_contents(); But I really doubt that global function called test exists on your page. There is a function called test in your class, but it’s not static (so you can’t call it from static context unless you change it to static function test(){…}), and … Read more