Please or Register to create posts and topics.

custom widget

Thanks for the forum and widget and a little advice for others on how to customize the widget

widget-3 – latest forum posts

#asgarosforumrecentposts_widget-3 .post-author {  
  display: none; 
}


#asgarosforumrecentposts_widget-3.organic-widget.widget.asgarosforumrecentposts_widget 
{
  color: #FFFFFF;
  background-color: #696969;
  border: 3px solid #000000;
  
}

#asgarosforumrecentposts_widget-3 .widget-title 
{
  color: #FFFFFF;
  font-size: 16pt;
  background-color: #a51239;
  border: 0px solid #000000;
  
}

#asgarosforumrecentposts_widget-3 .post-link 
{
  
  font-size: 16pt;
  margin-left: 10px;
  margin-bottom: 0px;
  font-weight: bold;
}

#asgarosforumrecentposts_widget-3 .post-date {  
  color: white;
  text-align: right;
  margin-right: 10px;
  font-size: 11pt;
  
}

 

widget-5 – the latest joke on the forum

#asgarosforumrecentposts_widget-5.organic-widget.widget.asgarosforumrecentposts_widget 
{
  color: #FFFFFF;
  background-color: #696969;
  border: 3px solid #000000;
  
}

#asgarosforumrecentposts_widget-5 .widget-title 
{
  color: #FFFFFF;
  font-size: 16pt;
  background-color: #a51239;
  border: 0px solid #000000;
  
}

#asgarosforumrecentposts_widget-5 .post-link
{  
  display: none; 
}

#asgarosforumrecentposts_widget-5 .post-read-more
{  
  display: none; 
}

#asgarosforumrecentposts_widget-5 .post-date
{  
  display: none; 
}

#asgarosforumrecentposts_widget-5
.line-height
{  
  display: none; 
}


#asgarosforumrecentposts_widget-5 .post-excerpt
{
  font-size: 16pt;
  text-align: center;
}

#asgarosforumrecentposts_widget-5 .widget-element 
{  
  border-bottom: 0px; 
}

#asgarosforumrecentposts_widget-5 .post-author {  
  display: none; 
}
widget length name - functions.php
add_filter('asgarosforum_filter_widget_title_length', 'custom_widget_length');
function custom_widget_length($length) {
    return 100;
}

widget excerpt – functions.php

add_filter('asgarosforum_widget_excerpt_length', 'custom_widget_excerpt_length');
      function custom_widget_excerpt_length($length) {
           return 300;
}
Thank you 

Rentom

Instead .post-date add an image to the widget

#asgarosforumrecentposts_widget-5 .post-date
{  
  
  content: url(https://pictureadvisor.cz/wp-content/uploads/2021/03/smallol.png);   
  width:50px; 
  height:50px;
  margin: 0 auto;
}

 

Quote from Escape Road City on March 14, 2021, 9:41 am
Thanks for the forum and widget and a little advice for others on how to customize the widget

widget-3 – latest forum posts

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
#asgarosforumrecentposts_widget-3 .post-author {
display: none;
}
#asgarosforumrecentposts_widget-3.organic-widget.widget.asgarosforumrecentposts_widget
{
color: #FFFFFF;
background-color: #696969;
border: 3px solid #000000;
}
#asgarosforumrecentposts_widget-3 .widget-title
{
color: #FFFFFF;
font-size: 16pt;
background-color: #a51239;
border: 0px solid #000000;
}
#asgarosforumrecentposts_widget-3 .post-link
{
font-size: 16pt;
margin-left: 10px;
margin-bottom: 0px;
font-weight: bold;
}
#asgarosforumrecentposts_widget-3 .post-date {
color: white;
text-align: right;
margin-right: 10px;
font-size: 11pt;
}
#asgarosforumrecentposts_widget-3 .post-author { display: none; } #asgarosforumrecentposts_widget-3.organic-widget.widget.asgarosforumrecentposts_widget { color: #FFFFFF; background-color: #696969; border: 3px solid #000000; } #asgarosforumrecentposts_widget-3 .widget-title { color: #FFFFFF; font-size: 16pt; background-color: #a51239; border: 0px solid #000000; } #asgarosforumrecentposts_widget-3 .post-link { font-size: 16pt; margin-left: 10px; margin-bottom: 0px; font-weight: bold; } #asgarosforumrecentposts_widget-3 .post-date { color: white; text-align: right; margin-right: 10px; font-size: 11pt; }
#asgarosforumrecentposts_widget-3 .post-author {  
  display: none; 
}


#asgarosforumrecentposts_widget-3.organic-widget.widget.asgarosforumrecentposts_widget 
{
  color: #FFFFFF;
  background-color: #696969;
  border: 3px solid #000000;
  
}

#asgarosforumrecentposts_widget-3 .widget-title 
{
  color: #FFFFFF;
  font-size: 16pt;
  background-color: #a51239;
  border: 0px solid #000000;
  
}

#asgarosforumrecentposts_widget-3 .post-link 
{
  
  font-size: 16pt;
  margin-left: 10px;
  margin-bottom: 0px;
  font-weight: bold;
}

#asgarosforumrecentposts_widget-3 .post-date {  
  color: white;
  text-align: right;
  margin-right: 10px;
  font-size: 11pt;
  
}

 

widget-5 – the latest joke on the forum

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
#asgarosforumrecentposts_widget-5.organic-widget.widget.asgarosforumrecentposts_widget
{
color: #FFFFFF;
background-color: #696969;
border: 3px solid #000000;
}
#asgarosforumrecentposts_widget-5 .widget-title
{
color: #FFFFFF;
font-size: 16pt;
background-color: #a51239;
border: 0px solid #000000;
}
#asgarosforumrecentposts_widget-5 .post-link
{
display: none;
}
#asgarosforumrecentposts_widget-5 .post-read-more
{
display: none;
}
#asgarosforumrecentposts_widget-5 .post-date
{
display: none;
}
#asgarosforumrecentposts_widget-5
.line-height
{
display: none;
}
#asgarosforumrecentposts_widget-5 .post-excerpt
{
font-size: 16pt;
text-align: center;
}
#asgarosforumrecentposts_widget-5 .widget-element
{
border-bottom: 0px;
}
#asgarosforumrecentposts_widget-5 .post-author {
display: none;
}
#asgarosforumrecentposts_widget-5.organic-widget.widget.asgarosforumrecentposts_widget { color: #FFFFFF; background-color: #696969; border: 3px solid #000000; } #asgarosforumrecentposts_widget-5 .widget-title { color: #FFFFFF; font-size: 16pt; background-color: #a51239; border: 0px solid #000000; } #asgarosforumrecentposts_widget-5 .post-link { display: none; } #asgarosforumrecentposts_widget-5 .post-read-more { display: none; } #asgarosforumrecentposts_widget-5 .post-date { display: none; } #asgarosforumrecentposts_widget-5 .line-height { display: none; } #asgarosforumrecentposts_widget-5 .post-excerpt { font-size: 16pt; text-align: center; } #asgarosforumrecentposts_widget-5 .widget-element { border-bottom: 0px; } #asgarosforumrecentposts_widget-5 .post-author { display: none; }
#asgarosforumrecentposts_widget-5.organic-widget.widget.asgarosforumrecentposts_widget 
{
  color: #FFFFFF;
  background-color: #696969;
  border: 3px solid #000000;
  
}

#asgarosforumrecentposts_widget-5 .widget-title 
{
  color: #FFFFFF;
  font-size: 16pt;
  background-color: #a51239;
  border: 0px solid #000000;
  
}

#asgarosforumrecentposts_widget-5 .post-link
{  
  display: none; 
}

#asgarosforumrecentposts_widget-5 .post-read-more
{  
  display: none; 
}

#asgarosforumrecentposts_widget-5 .post-date
{  
  display: none; 
}

#asgarosforumrecentposts_widget-5
.line-height
{  
  display: none; 
}


#asgarosforumrecentposts_widget-5 .post-excerpt
{
  font-size: 16pt;
  text-align: center;
}

#asgarosforumrecentposts_widget-5 .widget-element 
{  
  border-bottom: 0px; 
}

#asgarosforumrecentposts_widget-5 .post-author {  
  display: none; 
}
widget length name - functions.php
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
add_filter(‘asgarosforum_filter_widget_title_length’, ‘custom_widget_length’);
function custom_widget_length($length) {
return 100;
}
add_filter(‘asgarosforum_filter_widget_title_length’, ‘custom_widget_length’); function custom_widget_length($length) { return 100; }
add_filter('asgarosforum_filter_widget_title_length', 'custom_widget_length');
function custom_widget_length($length) {
    return 100;
}

widget excerpt – functions.php

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
add_filter(‘asgarosforum_widget_excerpt_length’, ‘custom_widget_excerpt_length’);
function custom_widget_excerpt_length($length) {
return 300;
}
add_filter(‘asgarosforum_widget_excerpt_length’, ‘custom_widget_excerpt_length’); function custom_widget_excerpt_length($length) { return 300; }
add_filter('asgarosforum_widget_excerpt_length', 'custom_widget_excerpt_length');
      function custom_widget_excerpt_length($length) {
           return 300;
}
Thank you 

Rentom

Thank you for sharing this customization guide for Asgaros Forum widgets! The CSS adjustments and PHP filters are super helpful for personalizing widget appearance and content. Great job enhancing user experience!