- This topic has 9 replies, 4 voices, and was last updated 5 years, 6 months ago by
David.
-
AuthorPosts
-
October 10, 2020 at 3:59 pm #1482615
Adam
I’m using the WordPress recent post widget to display recent posts, but I’m trying to create a replica of this using an HTML widget to display popular posts. (which I’ll be manually updating based on google analytics stats)
I use some CSS code supplied by you that adds a bullet point and aligns the text when it drops down a line, and this works fine for the recent post widget, but I would like it to also change the HTML widget I’ve added so that the line spacing, etc are the same. So both the recent and popular widget have the same spacing, alignment and bulletpoints.
Is this possible?
The CSS used is:
/* Latest post widget margin */
.widget_recent_entries ul {
margin-left: 1em;
}/* Latest post bulletpoints */
.widget_recent_entries ul li {
list-style-type: disc;
margin-bottom: 5px;October 10, 2020 at 7:50 pm #1482719Leo
StaffCustomer SupportHi there,
If you give the Popular Posts HTML widget a custom class like
widget_popular_poststhen CSS should just be this:.widget_popular_posts ul { margin-left: 1em; } /* Latest post bulletpoints */ .widget_popular_posts ul li { list-style-type: disc; margin-bottom: 5px; }October 11, 2020 at 4:02 am #1483045Adam
Can’t seem to get it working. I’m using the code in private info section.
October 11, 2020 at 7:58 am #1483412Leo
StaffCustomer SupportI’m no longer seeing the popular posts HTML widget?
October 15, 2020 at 8:01 pm #1491301Adam
Added it back in. Line spacing, bullet points and alignment still not functioning
October 15, 2020 at 8:13 pm #1491311Elvin
StaffCustomer SupportHi,
You can try changing the markup of your Custom HTML widget into this:
<ul class="widget_popular_posts"> <li><a href="https://chasingronin.com/travel-photography-gear/">Travel Photography Gear: What’s In Our Camera Bag?</a></li> <li><a href="https://chasingronin.com/lock-laces-elastic-shoelaces/">Lock Laces: Elastic No Tie Shoelaces</a></li> </ul>Leo’s CSS code should work well w/ this.
October 15, 2020 at 9:15 pm #1491349Adam
Still not working
October 16, 2020 at 1:52 am #1491563David
StaffCustomer SupportHi there,
try this CSS:
ul.widget_popular_posts { margin-left: 1em; } /* Latest post bulletpoints */ ul.widget_popular_posts li { list-style-type: disc; margin-bottom: 5px; }October 16, 2020 at 2:24 am #1491595Adam
Nailed it. Thanks David.
October 16, 2020 at 3:22 am #1491659David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.