Automatic Logout on from another active session

Answer has been updated because don’t need to write function, only use wp_destroy_all_other_sessions function with initlike this add_action(‘init’, ‘wp_destroy_all_other_sessions’); Developed its plugin and publish on WordPress Download here :One Active session

Remove Container Element From wp_nav_menu() Markup

FYI :container => ” is a string operation and it’s default set by div you can’t use true or false like bool expression. Just change the container => ‘ul’ then i hope you will get what you want to see. for more details please read this : https://developer.wordpress.org/reference/functions/wp_nav_menu/ Thanks Musa

How to change the markup WordPress inserts for post images

As far as I know you could hook into the filter image_send_to_editor like this: function html5_insert_image($html, $id, $caption, $title, $align, $url) { $url = wp_get_attachment_url($id); $html5 = “<figure id=’post-$id media-$id’ class=”align-$align”>”; $html5 .= “<img src=”https://wordpress.stackexchange.com/questions/231693/$url” alt=”$title” />”; $html5 .= “</figure>”; return $html5; } add_filter( ‘image_send_to_editor’, ‘html5_insert_image’, 10, 9 ); For additional tags like data-pil-thumb-url and … Read more

Modify previous and next text from pagination links

I found out a way that you can place any text. You just need to create an array where you want the paginate_links to appear. <!– Put this in your functions.php –> <?php $args = array( ‘base’ => ‘%_%’, ‘format’ => ‘?paged=%#%’, ‘total’ => 1, ‘current’ => 0, ‘show_all’ => false, ‘end_size’ => 1, ‘mid_size’ … Read more

How to influence the information displayed on widget inside wp-admin

Background: The reason why filtering with dynamic_sidebar_params doesn’t work with HTML is because WordPress strips HTML from Widget Heading in wp_widget_control() function like this: $widget_title = esc_html( strip_tags( $sidebar_args[‘widget_name’] ) ); WordPress also strips HTML in default JavaScript in wp-admin/js/widgets.js So without a customised solution, there is no default filter or option either with PHP … Read more

How to show product SKU on product page

Add this to your functions.php add_action( ‘woocommerce_single_product_summary’, ‘dev_designs_show_sku’, 5 ); function dev_designs_show_sku(){ global $product; echo ‘SKU: ‘ . $product->get_sku(); } This will output the product SKU below the product title. See image below. The product SKU is VERTEX-SLVR.