How to style individual categories differently in WordPress

Do you want to style categories differently in WordPress? Most WordPress themes use the same style for all category archive pages. However, if you run a content rich website, then you can style each category differently to maximize their potential. In this article, we will show you how to easily style categories differently in WordPress.

Why Style Categories Differently in WordPress?

As we said earlier, most WordPress themes use the same template for each category archive page. That’s because theme developers don’t know how you will be using the categories on your website and what those categories will be.

However, if you are running a content rich site, then changing the layout of a category archive page can have a dramatic impact on how users engage with the content on that page.

For example, if you run a news or magazine site, then you can have local ads displayed on the local news category. You can show weather information, show most popular stories in that category, and so on.

Having said that, let’s see how to easily style individual categories differently in WordPress.

Styling Individual Categories Differently in WordPress

There are multiple ways to style categories in WordPress. We will show you two different methods to style categories, and you can choose the one that best suits your needs and skill level.

Using Single Category Template in WordPress Theme

WordPress themes follow a standard template hierarchy. Depending on a template file name, WordPress can automatically pick the right template to display a page.

For example, it looks for category.php file to display category archive pages.

WordPress also allows you to create templates for individual categories as well. Let’s suppose you want to style the ‘Apple’ category differently. You can do that by adding a new template file to your theme and naming it category-apple.php.

Connect to your WordPress site using an FTP client and then go to /wp-content/themes/your-current-theme/ folder and create a new file category-apple.php. Don’t forget to replace apple with your own category name.

You can use your theme’s category.php file as a starting point. Simply edit and copy all of its content. Now edit your newly created category-apple.php file and paste the code inside it.

After that you can start making changes to your individual category template. You can create and use a different sidebar for this category, make it a full-width page, add a welcome message, or anything else you want.

Style Individual Categories in WordPress Using CSS

WordPress automatically adds CSS classes to different elements throughout your website. These include both the body class and the post class.

For example, if you view a category archive page and then use the Inspect Tool, you will notice category and category-name CSS classes in the body tag.

You can use this CSS class to style each individual category differently by adding custom CSS.

Here is some example CSS that you can use as a starting point.

body.category-apple {
background:url(“http://example.com/wp-content/uploads/2017/background.jpg”) no-repeat fixed;
.category-apple .site {
.category-apple a {

Don’t forget to change the category name in the CSS class with your own category name.

Google to tone down on display ads so you can browse faster

Google is on a quest to make online ads less obnoxious, which makes sense for a company that makes its living on web-based advertising. People hate videos that play automatically, glaring slogans, and ads that suck down bandwidth and slow down the browsing experience, and Google is serious about making a fix.

The company will be officially blocking some kinds of ads in its industry-dominating Chrome browser starting in 2018, and it’s already stopping ads that try to pop up in new tabs. Google is also taking steps to make its own ads less unruly, as ZDNet reports.

It’s doing all this by applying compression to its display ads using the Brotli compression algorithm. This specific compression scheme promises to reduce the size of Google’s ads by 15 percent compared to gzip compression, with a more than 40 percent reduction in some ads. While not every Google ad will enjoy this level of compression, Google says it’s applying Brotli compression “whenever possible.”

Google display ads have historically been heavy on browser resources

The benefits from putting its ads on a diet can be significant. As Michael Burns, a software engineer on Google’s Publisher Tagging and Ads Latency Team says: “[The use of compression] reduces the amount of data sent to end users by tens of thousands of gigabytes every day.” What that means for individual users is faster page loads, better overall performance, and, ultimately, lower battery consumption.

The Brotli compression algorithm is supported in the top web browsers today, including Chrome, Microsoft’s new Edge browser that’s featured in Windows 10, and Firefox. Only Apple’s Safari browser doesn’t support the new tool, which superseded the earlier Zopfli algorithm and provides up to 26 percent better compression.

In 2018, Google Chrome will start blocking any ads that don’t conform to the new Initial Better Ads Standards defined by the Coalition for Better Ads, including its own display ads. That means that users should gain a tremendous boost in their ability to enjoy the browsing experience without being subjected to the most obnoxious ads. In the meantime, Google will be working to make the ads that do show up just a little more efficient.

ScaleFT plans to make managing public clouds safer

ScaleFT, a new DevOps startup founded by a number of former Rackspace executives and engineers, today announced that it has raised an $800,000 seed round with a strategic investment by Rackspace and participation from a number of angel investors, including CoreOS CEO Alex Polvi (who himself previously worked at Rackspace).

It’s no secret that Rackspace wants to offer services on top of its competitors’ clouds, including Amazon, Google and Microsoft. As ScaleFT co-founder and CEO Jason Luce tells me, the company was interested in funding the company because its products fit in very well with this mission.

“Rackspace has been vocal about building a service business on AWS, GCE and Azure, and ScaleFT is advancing the tools that Rackspace ops teams will need for their new strategy,” Luce writes in today’s announcement. “This is an important reason why Rackspace is supporting our endeavor.”

ScaleFT’s first product, which is also launching today, is Scale Access for making access to servers easier and more secure. The company argues that an authentication solution based on SSH private keys isn’t just cumbersome but also not as secure as you would think. “Technologies like RSA, X.509 and SSH are available, but so complex that businesses are prevented from enjoying their full benefits,” Luce says.

Scale Access, however, uses fast-expiring keys that are only valid for a few minutes and an authentication solution that can be integrated with single sign-on solutions like Google Apps and the SAML standard. Because of this, it also works with tools that need a second factor for authentication.

The promise here is that SSH will still just work and that tools like Ansible for IT automation will work just like before. The service can also issue certifications for access to VPNs, web applications and other infrastructure services.

Gmail to let users email cash

It’s the social situation we all try to avoid; forgetting to pay someone back because we don’t have any cash, or that card reader thingie, to do it online.

Well Google are having a go at making debt settling easier, by allowing users to transfer funds on email.

It’s coming in over the next few weeks for all Gmail users.

Users will have to click the “£” icon which will soon appear on emails, and enter the amount they wish to send.

Google made the announcement on an official blog post and says the service will be free.

If you’re really desperate for that score to be settled, you can even send requests for how much money you’d like to receive.

Users without a Gmail account will also be able to be sent cash – everyone will have to set up a Google wallet balance, and link it to their debit card or bank account.

Original article from Amrican News Website.

ICT Kenya: 2014 year in review

Online shopping grew

Competition in online shopping grew with entrants in the nascent sector curving different niche to remain competitive.
Among the notable niche include dealers of used goods, brand new items, music.
An online data based was developed by Private security firm, KK security and online classifieds company, OLX, to tame spiraling cyber crime in the country.
The system aims to capture details of online buyers including national Identity cards (ID’s) and verified to secure e-commerce transactions.

Digital Migration

Kenya finally migrates from analogue to digital television broadcasting before the June 2015 deadline set by the International Telecommunications Union (ITU).
The move comes after, protracted court battles push for cheaper set top boxes and awareness creation that has lasted seven years since the move was mooted.
Cost of set top boxes have dropped significantly over the years from Sh 10,000 to Sh 1,799 for pay tv platforms and Sh 4,000 for Free-to air.

4G Network

Safaricom finally rolled out its high-speed 4G network to up game on the data segment-targeting to comprehensively reach out Nairobi and Mombasa By March 2015.
Chinese Mobile handset makers Huawei and Techno launched their 4G powered smartphones in the Kenyan market.

Essar’s Yu sold out to rivals

Indian mobile operator Essar agreed to sell Kenyan number three yuMobile to local rivals Airtel and Safaricom for Sh 10.5 billion ($120 million).

Microsoft dropped Nokia brand for Lumia

The landmark decision was made after tech giant bought Nokia’s mobile division back in April for $7.2bn along with a 10-year deal to use the Finnish company’s name on smartphones.

Smartphone users grew

Mobile phone subscriptions stood at 32.2 million, a figure that grew by almost 450,000 compared to the first quarter of the year buoyed by growth in middle class.
Industry reports claim penetration rate of smart phones in the country stands at 18 percent with over 15,000 devices sold each month.
Global smartphone shipments hit a new record of 295.3 million units in the second quarter of 2014, posting a 23.1 percent growth year over year and was expected to reach 300 million before year end.

Samsung/ Apple Battle for top spot intensified

Apple’s Iphone 6 plus launch laid it bare that the American multinational was planning to end a monopoly held by Samsung through its Galaxy series over the last three years.

Phablets cannibalized tablets

Latest IDC prediction: Phablet shipments (smartphones with screen sizes from 5.5 to less than 7 inches) will reach 175 million units worldwide in 2014, passing the 170 million portable PCs expected to ship during the same period

Adoption of credit cards soared

The country experienced signing of mega deals for credit cards between multinationals, local retailers and commercial banks in the plastic card market.
Kenya has less than 200,000 credit cards with industry reports putting the market’s potential at 400,000 units.
Mobile money transactions
Over the last12 months most retailers’ big and small alike also adopted mobile money services to push up total transaction value to Sh 1.1 trillion from Sh 871 million last year.

Thin sim technology
Equity Bank was given go ahead to launch Thin sim technology in Kenya to rival Safaricom’s M-pesa.