Fun facts layout

Hello,

Can I add comma or any other separators in fun facts value rather than just numbers?

I saw this topic under Sydney, is this possible to achieve in Sydney pro?

Thanks

Hello there,

Thank you for asking. I can confirm that it is possible to apply that changes on the pro version, as it uses the same core code.

Regards,
Kharis

So now stupid question,

Where is JS folder in Sydney Pro? I tried to look but could not find.

Hello there,

It can’t be found on your site’s admin area. You’ve to edit it locally on your computer. Extract the theme package, then you’ll find that js folder inside it. Once you’re done editing the mentioned files, you’ve to update it to your live server by using FTP program. On your server, it resides in the root directory > wp-content > themes > sydney-pro-ii > js.

Regards,
Kharis

I replaced the code in main.js file and uploaded via FTP.

But when I change the fact value to 1,000 or 2,000 it just shows 1 or 2

here is a link

I uploaded new main.js to Sydney Pro theme, but I use child theme, so is it the reason?

Hello there,

Yes, that’s the reason why. The child theme’s main.js doesn’t load on your site. Unfortunately there is no route to override the particular script of main theme’s. You need to do it in the main theme. Note that you have to redo this modification as updating the theme overwrites all files.

Regards,
Kharis

But, child inherits everything from Sydney Pro theme including main.js, right?

And some changes can be seen, its just that comma and numbers after that are not visible.

Hello there,

Thank you for the followup!

> But, child inherits everything from Sydney Pro theme including main.js, right?

Basically, a theme consists of some files: PHP, JS, CSS, and other assets like images. Some of them can be inherited from a child theme like style.css, functions.php, and other files that are part of template hierarchy.

> And some changes can be seen, its just that comma and numbers after that are not visible.

I am not sure. Could you please take a screenshot of it and share it here? For the screenshot file, upload it to the free file hosting service like Google Drive or Dropbox, so it is accessible through a public link.

Regards,
Kharis

Hi,

The suggested Javascript block is working, comma can be seen on home page after every 3 digit. I tried to reupload everything after long time and somehow it worked.

Thanks!

Can I ask you something more? Can’t we pass just a string to this facts, e.g. name of fact = coffee cups and value = unlimited

Also can we add $ sign before number? In either case, just pass string to the fact value?

Is it possible?

Hello there,

I visited your site, it looks like you’ve been able to add additional string by using before and after pseudo element. I did a great work!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis

Yes, I was able to add symbols before and after pseudo element along with string.

now the only question left is, add only a string and not any number. For example, coffee cup consumed = unlimited. It is not must requirement, and I don’t see the possibility but just checking.

For future readers,

In fun facts, Commas can be implemented by modifying main.js file as provided in above thread. Symbols and/or strings before or after number, can be implemented by modifying CSS in child theme as provided in code snipped library. For certain symbols, you have to add hex value of its equivalent HTML character code.

Hope this helps.