Currently we are thoroughly watching over the situation in Ukraine and trying to support the brave and unstoppable spirit of Ukrainian nation in fight against Russian invasion by donating to the official resources provided by the Government. NING is standing with Ukraine in this fight for freedom and independence and if you want to show your support you can donate here.
Слава Україні! Героям Слава!

Current status of the Ning Platform is always available on the Ning Status Blog.

Style Your View Counter

We have now been given a view counter which is great. Just thought I would share a way to be able to add some styles to them if you want them to stand out a bit.

Here is an example using the code below: https://jr-images.ning.com/codes-archive

As the view counter shares the comments count class we need to add a new class to the views so add this code to your social site builder > custom code > end of page section.

<script>
x$(document).ready(function() {
x$('.entry-commentsCount:contains("Views")').closest('.entry-commentsCount').addClass('memberViews');
});
</script>

Now we can target the view counter with css using the new class we added :  memberViews

The css goes in your design studio custom css

To change the font size for the word Views and the count number we can add this

.memberViews{ font-size:16px }

If you just want to make the count size bigger you can use this

.memberViews a{ font-size:16px}

I added a background colour and also a hover change with a little extra padding on my number count by using this

.memberViews a{ background-color:lightgrey; padding:0px 10px 0px 10px; border-radius:5px }
.memberViews a:hover{ background-color: royalblue; color:white; text-decoration:none }

As you can see now you have a class for the views you can do as you with using some css styling.

Now as an extra tip if you wanted it to look different on particular forums, blogs etc you can use multiple styling by just adding the forum page name before the code. So you could use some default styling for your views using the example above and then use some more styling for a specific forum for example.

So let suppose I have a forum called:  ideas

The css class for that forum would be called   .page-ideas

So the extra code to just style the views for that forum would look like this

.page-ideas .memberViews{ font-size:16px }
.page-ideas .memberViews a{ background-color:lightgrey; padding:0px 10px 0px 10px; border-radius:5px }
.page-ideas .memberViews a:hover{ background-color: royalblue; color:white; text-decoration:none }

As you can see it's pretty easy to target different forums etc by just adding it's name before the code.

You need to be a member of Ning Creators Social Network to add comments!

Join Ning Creators Social Network

Votes: 0
Email me when people reply –

Replies

This reply was deleted.
 

Some interesting articles related to community management, digital marketing etc. could be found in our digest. Don't hesitate to leave a feedback so we would know that we should continue :-)

Latest Activity

Eva liked ⚡JFarrow⌁'s discussion What is going on with Ning? What Do We have to Look Forward To?
3 hours ago
Eva liked Suave's discussion I AM LOOKING FOR DEVELOPER ASSISTANCE WITH ADDING AUTOMATIC MUSIC TO MY HOME PAGE
3 hours ago
Alex - Rosas † Negras posted a discussion
yesterday
Alex - Rosas † Negras posted a discussion
Wednesday
Alex - Rosas † Negras replied to Suave's discussion
I AM LOOKING FOR DEVELOPER ASSISTANCE WITH ADDING AUTOMATIC MUSIC TO MY HOME PAGE
"if you need I'm here, if you look in my discussions you will also find the playstil"
May 23
Alex - Rosas † Negras replied to ⚡JFarrow⌁'s discussion
What is going on with Ning? What Do We have to Look Forward To?
"Bizz ⚡JFarrow⌁ 
I'm sorry that many like us have worked so hard and given up, but at least I'm…"
May 23
⚡JFarrow⌁ posted a discussion
Back in the day, this community was jumping with activity.   But since the Ukraine war broke out we…
May 22
⚡JFarrow⌁ and Truebook are now friends
May 22
Alex - Rosas † Negras replied to Alex - Rosas † Negras's discussion
I want to thank JOHN BIZLEY ( BIZZ) for his invaluable help, active icons on the Ning bar,CODES ADDED
"A thousand thanks"
May 20
Alex - Rosas † Negras replied to Pam Givens's discussion
Landing Page
"Pam Givens this is an example i created of an old 3.0 site"
May 20
Alex - Rosas † Negras replied to Pam Givens's discussion
Landing Page
""
May 20
Alex - Rosas † Negras replied to Alex - Rosas † Negras's discussion
Sorry for my absence
"Pam Givens hi my friend, yes everything is ok a big hug"
May 19
More…