html static widget code
// Step 1
function codepotent_display_static_dashboard_widget() {
?>
<div style="display:grid;justify-content:space-between;grid-template-columns:repeat(auto-fit,minmax(48%,1fr));grid-template-rows:1fr;grid-gap:20px;">
<div>
<img src="https://codepotent.com/wp-content/uploads/2019/07/kelly-marks-avatar.jpg" style="border:1px solid #ccc;padding:2px;">
</div>
<div>
<h2>Kelly Marks</h2>
Your project manager, <strong>Kelly Marks</strong>, is committed to your success! If you need anything at all, drop Kelly a line!
<ul>
<li>(123) 456-7890 x 123</li>
<li><a href="#">[email protected]</a></li>
</ul>
</div>
</div>
<?php
}
// Step 2
function codepotent_register_static_dashboard_widget() {
wp_add_dashboard_widget(
'my_static_dashboard_widget', // your own custom widget id
'My Widget', // the widget box title
'codepotent_display_static_dashboard_widget' // function that displays content
);
}
// Step 3
add_action('wp_dashboard_setup', 'codepotent_register_static_dashboard_widget');
Are there any code examples left?
New code examples in category Html
-
Html 2022-03-27 21:55:05 how to kill html
-
Html 2022-03-27 21:55:02 How to create web urls without extensions
-
Html 2022-03-27 21:45:11 space between 2 h tags without break
-
Html 2022-03-27 21:40:13 how to resize submit button in html
-
Html 2022-03-27 20:40:18 https://www.codegrepper.com
-
Html 2022-03-27 19:55:09 show image inside table with innerhtml
-
Html 2022-03-27 19:30:47 html email input
-
Html 2022-03-27 18:45:01 how to add favicon in html
-
Html 2022-03-27 18:15:21 picture html
-
Html 2022-03-27 18:15:11 ex: javaasdasdasdasd