{"id":1047,"date":"2025-11-10T12:51:23","date_gmt":"2025-11-10T17:51:23","guid":{"rendered":"https:\/\/dox.opentechnologies.ca\/?p=1047"},"modified":"2025-11-10T17:30:41","modified_gmt":"2025-11-10T22:30:41","slug":"inspiro-theme-customization-author-bio-widget","status":"publish","type":"post","link":"https:\/\/dox.opentechnologies.ca\/index.php\/2025\/11\/10\/inspiro-theme-customization-author-bio-widget\/","title":{"rendered":"Inspiro Theme Customization | Author Info Widget"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Author Info Widget<\/h3>\n\n\n\n<p>The <strong>Author Info Widget<\/strong> is a customizable sidebar feature designed to highlight the author of a post. When viewing a single post, this widget automatically displays:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Author Avatar:<\/strong> The author\u2019s profile picture, pulled directly from WordPress.<\/li>\n\n\n\n<li><strong>Display Name:<\/strong> The full name of the author as set in their user profile.<\/li>\n\n\n\n<li><strong>Bio:<\/strong> A short description or biography provided by the author.<\/li>\n\n\n\n<li><strong>Website (optional):<\/strong> A clickable link to the author\u2019s personal or professional website, if provided in their profile.<\/li>\n<\/ul>\n\n\n\n<p>The widget is fully responsive and styled to appear as a clean card in the sidebar. It enhances engagement by giving readers a quick view of who wrote the content, providing context, credibility, and a direct connection to the author.<\/p>\n\n\n\n<p>Additionally, the widget\u2019s styling can be customized through CSS to match the theme of your site, including colors, spacing, shadows, and hover effects, making it both functional and visually appealing.<\/p>\n\n\n\n<pre class=\"wp-block-verse\">This article applies to WordPress Inspiro v2.1.4 by WPZOOM<\/pre>\n\n\n\n<p>Add this function to the theme\/sub-theme functions.php file (you may replace suffux dox_ ;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * START - function to create widget of author info\n *\/\n\nfunction dox_author_info_widget_display() {\n  if (is_single()) {\n    $author_id = get_the_author_meta('ID');\n    $author_website = get_the_author_meta('user_url', $author_id); ?&gt;\n\n    &lt;div class=\"widget author-info\"&gt;\n      &lt;div class=\"author-avatar\"&gt;&lt;?php echo get_avatar($author_id, 96); ?&gt;&lt;\/div&gt;\n      &lt;h4 class=\"author-name\"&gt;&lt;?php echo esc_html(get_the_author_meta('display_name', $author_id)); ?&gt;&lt;\/h4&gt;\n      &lt;p class=\"author-bio\"&gt;&lt;?php echo esc_html(get_the_author_meta('description', $author_id)); ?&gt;&lt;\/p&gt;\n\n      &lt;?php if ($author_website) : ?&gt;\n        &lt;p class=\"author-website\"&gt;\n          &lt;a href=\"&lt;?php echo esc_url($author_website); ?&gt;\" target=\"_blank\" rel=\"noopener\"&gt;\n            Visit Website\n          &lt;\/a&gt;\n        &lt;\/p&gt;\n      &lt;?php endif; ?&gt;\n    &lt;\/div&gt;\n  &lt;?php }\n}\n\nfunction dox_register_author_info_widget() {\n  register_sidebar(array(\n    'name' =&gt; 'Author Info Sidebar',\n    'id' =&gt; 'author-info-sidebar',\n    'before_widget' =&gt; '&lt;div class=\"widget %2$s\"&gt;',\n    'after_widget' =&gt; '&lt;\/div&gt;',\n    'before_title' =&gt; '&lt;h3 class=\"widget-title\"&gt;',\n    'after_title' =&gt; '&lt;\/h3&gt;',\n  ));\n\n  \/\/ Register as widgetized output\n  register_widget('WP_Widget_Author_Info');\n}\n\nclass WP_Widget_Author_Info extends WP_Widget {\n  function __construct() {\n    parent::__construct('author_info', __('Author Info', 'textdomain'));\n  }\n\n  function widget($args, $instance) {\n    echo $args&#91;'before_widget'];\n    dox_author_info_widget_display();\n    echo $args&#91;'after_widget'];\n  }\n}\n\nadd_action('widgets_init', function() {\n  register_widget('WP_Widget_Author_Info');\n});<\/code><\/pre>\n\n\n\n<p>Add this to the theme CSS, and revise it to suit your layout needs;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* === Author Info Widget Card Style === *\/\n.widget.author-info {\n  background: #fff;                 \/* white card background *\/\n  border: 1px solid #e2e2e2;        \/* subtle border *\/\n  border-radius: 12px;              \/* rounded corners *\/\n  box-shadow: 0 4px 10px rgba(0,0,0,0.05); \/* soft shadow *\/\n  padding: 20px;\n  text-align: center;\n  margin-bottom: 20px;\n  transition: box-shadow 0.2s ease, transform 0.2s ease;\n}\n\n.widget.author-info:hover {\n  box-shadow: 0 6px 15px rgba(0,0,0,0.1);\n  transform: translateY(-2px);\n}\n\n\/* Avatar *\/\n.widget.author-info .author-avatar img {\n  border-radius: 50%;\n  width: 96px;\n  height: 96px;\n  object-fit: cover;\n  margin-bottom: 12px;\n  border: 2px solid #ddd;\n}\n\n\/* Author name *\/\n.widget.author-info .author-name {\n  font-size: 1.1em;\n  font-weight: 600;\n  margin: 0;\n  color: #222;\n}\n\n\/* Bio text *\/\n.widget.author-info .author-bio {\n  font-size: 0.9em;\n  line-height: 1.5;\n  color: #666;\n  margin-top: 10px;\n}\n\/* Author website *\/\n.widget.author-info .author-website {\n  font-size: 0.9em;\n  line-height: 1.5;\n  color: #666;\n  margin-top: 10px;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Author Info Widget The Author Info Widget is a customizable sidebar feature designed to highlight the author of a post. When viewing a single post, this widget automatically displays: The widget is fully responsive and styled to appear as a clean card in the sidebar. It enhances engagement by giving readers a quick view of &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/dox.opentechnologies.ca\/index.php\/2025\/11\/10\/inspiro-theme-customization-author-bio-widget\/\" class=\"more-link\">Read more<span class=\"screen-reader-text\"> &#8220;Inspiro Theme Customization | Author Info Widget&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1060,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41,110,36],"tags":[108],"class_list":["post-1047","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","category-theme-customizations","category-web","tag-custom-theme"],"_links":{"self":[{"href":"https:\/\/dox.opentechnologies.ca\/index.php\/wp-json\/wp\/v2\/posts\/1047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dox.opentechnologies.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dox.opentechnologies.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dox.opentechnologies.ca\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dox.opentechnologies.ca\/index.php\/wp-json\/wp\/v2\/comments?post=1047"}],"version-history":[{"count":10,"href":"https:\/\/dox.opentechnologies.ca\/index.php\/wp-json\/wp\/v2\/posts\/1047\/revisions"}],"predecessor-version":[{"id":1086,"href":"https:\/\/dox.opentechnologies.ca\/index.php\/wp-json\/wp\/v2\/posts\/1047\/revisions\/1086"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dox.opentechnologies.ca\/index.php\/wp-json\/wp\/v2\/media\/1060"}],"wp:attachment":[{"href":"https:\/\/dox.opentechnologies.ca\/index.php\/wp-json\/wp\/v2\/media?parent=1047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dox.opentechnologies.ca\/index.php\/wp-json\/wp\/v2\/categories?post=1047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dox.opentechnologies.ca\/index.php\/wp-json\/wp\/v2\/tags?post=1047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}