Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/phihof3/frumph.net/wp-content/themes/comicpress/widgets/calendar.php on line 45

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/phihof3/frumph.net/wp-content/themes/comicpress/widgets/calendar.php on line 67

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/phihof3/frumph.net/wp-content/themes/comicpress/widgets/calendar.php on line 84

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/phihof3/frumph.net/wp-content/themes/comicpress/widgets/calendar.php on line 91

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/phihof3/frumph.net/wp-content/themes/comicpress/widgets/calendar.php on line 146

Warning: Cannot modify header information - headers already sent by (output started at /home/phihof3/frumph.net/wp-content/themes/comicpress/widgets/calendar.php:45) in /home/phihof3/frumph.net/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/phihof3/frumph.net/wp-content/themes/comicpress/widgets/calendar.php:45) in /home/phihof3/frumph.net/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/phihof3/frumph.net/wp-content/themes/comicpress/widgets/calendar.php:45) in /home/phihof3/frumph.net/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/phihof3/frumph.net/wp-content/themes/comicpress/widgets/calendar.php:45) in /home/phihof3/frumph.net/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/phihof3/frumph.net/wp-content/themes/comicpress/widgets/calendar.php:45) in /home/phihof3/frumph.net/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/phihof3/frumph.net/wp-content/themes/comicpress/widgets/calendar.php:45) in /home/phihof3/frumph.net/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/phihof3/frumph.net/wp-content/themes/comicpress/widgets/calendar.php:45) in /home/phihof3/frumph.net/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home/phihof3/frumph.net/wp-content/themes/comicpress/widgets/calendar.php:45) in /home/phihof3/frumph.net/wp-includes/rest-api/class-wp-rest-server.php on line 1893
{"id":273,"date":"2009-01-13T15:06:57","date_gmt":"2009-01-13T23:06:57","guid":{"rendered":"http:\/\/frumph.webcomicplanet.com\/?p=111"},"modified":"2009-01-13T15:06:57","modified_gmt":"2009-01-13T23:06:57","slug":"you-can-widgetize-anything-you-want","status":"publish","type":"post","link":"https:\/\/frumph.net\/wordpress\/you-can-widgetize-anything-you-want\/","title":{"rendered":"You can widgetize *anything* you want."},"content":{"rendered":"

Creating widgets out of an area of space on your page is more simple then people realize.\u00a0\u00a0\u00a0 Say for example you want to widgetize the footer, let’s do that right now.<\/p>\n

<\/p>\n

1st we’re going to add some code to the functions.php to recognize that we have a widget in the wp-admin console options for widgets.<\/p>\n

In your comicpress theme’s function.php file, find this line: (dependent on which theme)<\/p>\n

\nif\u00a0 ( function_exists('register_sidebar' ) )\nregister_sidebar( array('name'=&gt;'Left Sidebar' ));\nregister_sidebar( array('name'=&gt;'Right Sidebar' ));\n<\/pre>\n

And lets add one<\/p>\n

\nregister_sidebar( array('name'=&gt;'FooterWidget'));\n<\/pre>\n

however I want to clean this code up so make it look like this:<\/p>\n

\nif\u00a0 ( function_exists('register_sidebar' ) ) {\nregister_sidebar( array('name'=&gt;'Left Sidebar' ));\nregister_sidebar( array('name'=&gt;'Right Sidebar' ));\nregister_sidebar( array('name'=&gt;'FooterWidget' ));\n}\n<\/pre>\n

What this says is “if you can register a\u00a0sidebar, register these sidebar’s to be seen in the wp-admin\/widgets\u00a0menu and store the information of what’s in them in the database.<\/p>\n

Next we’re going to edit the footer.php file, right under the <div id=”footer”> we’re going to make\u00a0wordpress see the widget.<\/p>\n

\n&lt;div id=&quot;footer&quot;&gt;\n&lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('FooterWidget') ) : ?&gt;\n&lt;?php endif; ?&gt;\n&lt;\/div&gt;\n<\/pre>\n

What this says is if there’s no dynamic sidebar available and no sidebar in the database named FooterWidget then do whats inside the area between the code, else display the widgets that have been assigned to FooterWidget<\/p>\n

That’s all there to it, the width of the area is already defined in the #footer CSS, the best use of this widget would be a text-box widget where you can place some sort of advertisement.\u00a0 You can also do something like this for the header or even above the header for more advertisements instead of hard coding different ads all the time you just edit the widget information.<\/p>\n

– Phil<\/p>\n","protected":false},"excerpt":{"rendered":"

Creating widgets out of an area of space on your page is more simple then people realize.\u00a0\u00a0\u00a0 Say for example you want to widgetize the footer, let’s do that right now.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-273","post","type-post","status-publish","format-standard","hentry","category-wordpress","uentry","postonpage-1","odd","post-author-frumph"],"_links":{"self":[{"href":"https:\/\/frumph.net\/wp-json\/wp\/v2\/posts\/273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/frumph.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/frumph.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/frumph.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/frumph.net\/wp-json\/wp\/v2\/comments?post=273"}],"version-history":[{"count":0,"href":"https:\/\/frumph.net\/wp-json\/wp\/v2\/posts\/273\/revisions"}],"wp:attachment":[{"href":"https:\/\/frumph.net\/wp-json\/wp\/v2\/media?parent=273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/frumph.net\/wp-json\/wp\/v2\/categories?post=273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/frumph.net\/wp-json\/wp\/v2\/tags?post=273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}