html static widget code

Solutions on MaxInterview for html static widget code by the best coders in the world

showing results for - "html static widget code"
Triston
28 Mar 2017
1// Step 1
2function codepotent_display_static_dashboard_widget() {
3    ?>
4    <div style="display:grid;justify-content:space-between;grid-template-columns:repeat(auto-fit,minmax(48%,1fr));grid-template-rows:1fr;grid-gap:20px;">
5        <div>
6            <img src="https://codepotent.com/wp-content/uploads/2019/07/kelly-marks-avatar.jpg" style="border:1px solid #ccc;padding:2px;">
7        </div>
8        <div>
9            <h2>Kelly Marks</h2>
10            Your project manager, <strong>Kelly Marks</strong>, is committed to your success! If you need anything at all, drop Kelly a line!
11            <ul>
12                <li>(123) 456-7890 x 123</li>
13                <li><a href="#">kelly.marks@mostfruitfuldesigns.com</a></li>
14            </ul>
15        </div>
16    </div>
17    <?php
18}
19
20// Step 2
21function codepotent_register_static_dashboard_widget() {
22    wp_add_dashboard_widget(
23        'my_static_dashboard_widget', // your own custom widget id
24        'My Widget', // the widget box title
25        'codepotent_display_static_dashboard_widget' // function that displays content
26        );
27}
28
29// Step 3
30add_action('wp_dashboard_setup', 'codepotent_register_static_dashboard_widget');