What Things To Keep In Mind When Choosing a Theme

When it comes to choosing a theme for their websites, most newcomers are overwhelmed. There are thousands of themes available, both free and paid. Each theme appears to be superior to the others. How do you pick the best WordPress theme?

As a result, I’ve compiled a list of 7 Things to Consider When Choosing a Theme.

1. DO choose a theme that supports the latest version of WordPress:

My #1 recommendation has nothing to do with layout or fonts—all it’s about is usefulness and security. For three very good reasons, the theme you pick must be compatible with the most recent version of WordPress:

  • Your WordPress site’s functionality may not work as you want it to if your theme isn’t fully compatible with the current WP version.
  • Your site’s functionality will suffer if the plugins you use require the most recent version of WordPress and you are unable to upgrade because of your theme.
  • If you choose a theme that does not support newer versions of WordPress, you may decide not to upgrade WordPress, which can result in security holes, data breaches, site defacement, and other problems.
2. Strive for Simplicity:

Many WordPress themes have a variety of colors, complex layouts, spectacular animations, and so on. You may require those items on occasion, but in most circumstances, you will not require all of them. Look for a theme with a design layout that will assist you to achieve your aim. It must look excellent without sacrificing usefulness or simplicity.

 Make certain that the presentation style of the theme is not excessively complex. The goal of web design is to help users discover the information they need while also supporting site owners in achieving their objectives.

3. Responsive is Not Optional Anymore:

Responsive themes automatically alter their layout to fit multiple screen sizes and devices.

Mobile and other handheld devices produce a large amount of online traffic. Depending on the content of your website, this figure might be as high as 50% of the total number of visitors.

Most WordPress themes are already responsive by default. But there are still sellers who are selling fixed-width layouts that are not mobile-friendly at all. Make sure that the theme you are choosing for your website is mobile-friendly.

4. Supported Plugins:

If you are looking for a WordPress theme, you should also consider its compatibility with plugins because WordPress plugins are what give WordPress its true power. You can accomplish anything with your WordPress site thanks to these plugins.

5. Page Builders:

Page builders are WordPress plugins that let you construct page layouts with a drag-and-drop user interface.

 Many premium WordPress themes have pre-installed page builders. Some of these page builders are only available to the theme creator.

Using a page builder like this to construct landing pages might result in a lot of needless code. If you ever change the theme, those pages will need a lot of cleaning up.

You should select themes that have one of the most popular page builder plugins. You may also buy these page builders individually and use them with different themes.

6. SEO Friendliness:

Your theme is critical to the SEO friendliness of your site. A good-looking theme might also produce poorly coded HTML, which can harm your site’s search engine performance.

It may be tough for beginners to evaluate the source code of a theme on their own. Therefore, many premium theme developers will tell you that their sites are SEO-friendly.

7. Ratings and Reviews:

The ratings and reviews left by users are other good measures of a theme’s quality. Customer reviews will appear if the theme is offered on a third-party marketplace.

The rating area for free themes is located directly below the download button. It will display the number of user reviews and ratings. If you click on 5 stars, it will display all the reviewers that rated the theme 5 stars.

Want to make a career out of programming in 30 days?

Want to make a career out of programming in 30 days? Here are the things you need to know and the path you need to follow.

What are Computer Programming Languages?

Programming languages are just like human based languages, they are a set of languages that humans can use to communicate to computers, the portion of the language that computer understands is called a binary when the commands given to computer is translated to binary is called compiling, every language that exists taking the example of python to C have their own unique features although some times there are things that are in common.

These languages that are a piece of machine intelligence allows computers to process large and complex bulk of information in no time for example, if a person is given a list of random human names and is asked to place them in alphabetical order, chances are that it will take a good amount of time and will include number of errors.

MAKING A CAREER OUT OF PROGRAMMING LANGUAGES:

Programmers are a type of architects, digital architects you can say to be precise who give their time and effort to create new and amazing technologies and it is a fantastic profession, and you have probably found yourself thinking, sitting on your couch, wondering how to become a programmer.

Take a deep breath and give it a thought about all the online things you have done today like all tech-savvy people out there, you have probably checked your emails, scrolled through your social media and browsed through your favorite websites, but have you ever imagined that the virtual world that you visit every day and go by in seconds is the result of hours long full of fatigue programming work.

Programming is a fantastic career path with great potential for growth, especially since so much of our lives are now lived online and here are some statistics to prove you that

The Bureau of Labor Statistics reports that the profession will grow by a full 13 percent between 2018 and 2028 twice the average rate of growth expected for all other occupations. 

According to PayScale, the majority of programmers feel happy about their success, confident in their skills, and secure about their financial futures; the profession enjoys a 4.5 ranking (out of 5) for satisfaction.

Perhaps you also wish to be a part of this community. If yes, here are the 5 steps you can follow in becoming a successful programmer:

  1. Decide Which Industry You are Interested In
  2. Identify the Languages You Need to Learn
  3. Start Learning Independently
  4. Start Your Own Projects
  5. Begin Looking for Jobs

Top 10 programming languages:

1. Python

 Python is greatly regarded as a programming language that is easy to learn, due to its simple syntax, and a toolkit, in fact, it’s the first language that many students learn in the field of programming.

2. JavaScript

JavaScript is the most popular programming language for building interactive websites.

3. Java

Java is the programming language most commonly linked with the development of client-server applications, which are used by large businesses with masses of data around the world.

4. C#

 Microsoft developed C# as a faster and more secure variant of C. It is fully combined with Microsoft’s .NET software framework, which supports the development of applications for Windows, browser plug-ins, and mobile devices.

5. C

 Along with Python and Java, C forms a “good foundation” for learning how to program, As one of the first programming languages ever developed, C has served as the foundation for writing more modern languages such as Python, Ruby, and PHP.

6. C++

 C++ is an extension of C that works well for programming the systems that run applications, as opposed to the applications themselves. C++ also works well for multi-device and multi-platform systems. Over time, programmers have written a large set of libraries and compilers for C++.

7. Go

Also referred to as Golang, Go was developed by Google to be an efficient, readable, and secure language for system-level programming. It works well for distributed systems, in which systems are located on different networks and need to communicate by sending messages to each other. While it is a relatively new language, Go has a large standards library and is taking over the market rapidly.

8. R

R is heavily used in statistical analytics and machine learning applications. The language is extensible and runs on many operating systems. Many large companies have adopted R in order to analyze their massive data sets, so programmers who know R are in great demand. 

9. Swift

Swift is Apple’s language for developing applications for Mac computers and Apple’s mobile devices, including the iPhone, iPad, and Apple Watch. Like many modern programming languages, Swift has a highly readable syntax, runs code quickly.

10. PHPs

PHP is widely used for server-side web development, when a website frequently requests information from a server.

Why database should be taught before programming in universities?

Database Programming
Learn Database before Coding

Often students from the initial semester ask me how do we store our data in our programming projects? When students join university to learn about computer science and technology they are usually taught programming first in courses like introduction to programming. As part of the coursework, students are required to work on a project. The majority of the projects, in fact almost all projects involve data handling and that data needs to be stored somewhere, usually in databases.

Problems Students Face

As a novice students don’t know how to store data. One option is to store data in plain text files if filing is taught to them but in that case, their project becomes too complex for them. In my opinion, file format is an advanced topic for students that have just started learning how to program. So, students get stuck on where and how to store data. They create variables and arrays to store data in memory but that is not very useful until they have the option to store their data somewhere permanently that they can retrieve later. Otherwise, every time they run their project they have to feed data from the beginning.

Teach Database Before Programming

If universities modify their courses and add database in the first semester and replace programming courses with it then it would be easier for students to get started in computer science degree. Introduction to databases is a relatively easier course than programming and students will know what a database is, how to store data in the database, and how to retrieve it later using SQL. Then in the next semester if they do a programming course then it will require only one lecture to teach them how to access a database from your code and how to store and retrieve data. That will make their projects more valuable and make more sense to them and they can take it to an advanced level in forthcoming courses.

Your Take?

What is your opinion? Please, let me know in the comments.

Click here to read more about Databases.

Mark parent category menu active on single custom post view in WordPress

Recently I developed a theme for one of my clients and I had to highlight the menu item of the parent category in the main menu when one of its associated single custom posts was viewed. For that, I had to add an action in my functions.php file for nav_menu_css_class. It returns the ‘active’ class, which WordPress adds to the parent category menu item in the main menu. You can see the code at Gist here or below.

<?php

add_action('nav_menu_css_class', 'add_current_nav_class', 10, 2 );

function add_current_nav_class($classes, $item) {
// Getting the current post details
global $post;

// Getting the post type of the current post
$current_post_type = get_post_type_object(get_post_type($post->ID));
$current_post_type_slug = $current_post_type->rewrite['slug'];

// Getting the URL of the menu item
$menu_slug = strtolower(trim($item->url));

// If the menu item URL contains the current post types slug add the current-menu-item class
if (strpos($menu_slug,$current_post_type_slug) !== false) {
$classes[] = 'active';
}

// Return the corrected set of classes to be added to the menu item
return $classes;
}
?>

Adding above code in you functions.php file will do the trick.

Click here to read more on WordPress.

Why we moved from OpenShift to Google Cloud

The good old days

When OpenShift was in its version 1 it was great from the customer’s point of view with a low budget. OpenShift v1 had free offers to deploy apps and add a custom domain to it. There was no SSL support but it could be handled via the CloudFlare solution, making the overall solution a great one.

Then there comes OpenShift v2

RedHat then launched OpenShift v2 and added a restriction that gears will be shut down after a certain period of inactivity and also removed the support for custom domain.

That was the time that we had to move to some other cloud platform that could support our apps with low resources and without investing anything. Because all good things in life are free.

Google Cloud to the rescue

So we came across the Google Cloud platform offering and we had $300 credit in a free trial for 6 months. That was more than enough for us to start with. And in fact, they have micro virtual machine instances that are free for life with 30GB storage. That is more than enough for small apps to run for free that are under experiment or don’t have any monetization plans.

So, we migrated several of our apps from OpenShift to Google Cloud and started leveraging free credits provided by Google.

Just this week we consumed all our credit and our trial expired. Our virtual machine instances were shut down, but it didn’t take long before we enabled billing on our project and downgraded our instances to micro ones which are free. That gave us such a relief that our apps are still running although with low resources but it is fine as they are not our revenue-generating apps and are just experiments.

Click here to read more about Google.

Displaying Multiline Title in WordPress

In WordPress when the title is written it is usually displayed in a single line on front-end until it is too long to display in one line. But if you want to write the title in multiline and want to line break the title after a certain word how can you do that?

It is pretty simple. Since we know the fact that when the title is displayed it is a heading which is displayed using an HTML tag of course. So, taking benefit of HTML we can just insert an HTML line break element <br/> just after the word in our title where we want the line break. Like this:

“This is my title <br/> with my own line break”

WordPress Multiline Title

This will be displayed in two lines when you publish the post.

Read more about WordPress.

Different color for each menu item in WordPress

In a recent project, I got a requirement that each menu item should be highlighted in a different color when visited. The menu items and their required active colors were:

  • Home – Green
  • Portfolio – Blue
  • Team – Yellow
  • Contact – Red

These colors were to be applied only when that page is being visited otherwise color of the menu item should be the default black color.

So, if a user is visiting the home page then the menu item should something like this

home_menu.png

And if the user is visiting the Portfolio page then the menu should be something like this

portoflio_menu.png

Considering that this was a WordPress theme project where we were using Understrap as a base theme which is based on Twitter Bootstrap. So, when user visits, for example, a home page WordPress will attach a .active CSS class to it. Taking advantage of that we added different classes for each menu item and then used the following rule to make menu item colors different:

.navbar-nav > .home.active > a {
    color: green!important;
}
.navbar-nav > .portfolio.active > a {
    color: blue!important;
}
.navbar-nav > .team.active > a {
    color: yellow!important;
}
.navbar-nav > .connect.active > a {
    color: red!important;
}

CSS Class Chaining Method

We utilized the class chaining method here. If you note that .home.active classes are chained together without space and which means it will select an element with both these classes.
That did the trick and all menu items were in a different color.

Rollover image – Change image on hover/mouse over

Often when designing websites static or dynamic, PHP or ASP.Net, Laravel or WordPress, you have to design in a way that if the user hovers an image it gets changed and an alternate image is displayed. This can be easily achieved via simple HTML events. Here is the trick:

<img src="FIRST IMAGE URL GOES HERE"
onmouseover="this.src='SECOND IMAGE URL GOES HERE'"
onmouseout="this.src='FIRST IMAGE URL GOES HERE - AGAIN'" />

It is simple as that.

Click here to read more tips.

Sharing data between Laravel and Angular

When building applications with Laravel and Angular you might come across a problem where you want to print data using AngularJS brackets {{}} but before it can be parsed by Angular, Laravel blade engine parses it and tries to replace the value if it finds one. Otherwise, Laravel will start complaining about the variables. To solve that you just need to prepend brackets with @ sign so the blade engine knows that you just need to ignore this expression and AngularJS will take care of it. And AngularJS will parse it and replace the variables with actual data.

Below is a sample snippet to do this:

@{{ article.body }}

In this snippet, the Laravel blade engine will ignore this and AngularJS will parse it and replace it with the article.body data it has.

Click here to read more about Laravel and Angular.

Laravel: Specified key was too long error on migration

When you install a new Laravel project with ‘laravel new’ and run the migration that comes with it you might get the following error:

#php artisan migrate
Migration table created successfully.


 [Illuminate\Database\QueryException]
 SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`))

[PDOException]
 SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

To solve this error edit your app/Providers/AppServiceProvider.php file.

Add the namespace:

use Illuminate\Support\Facades\Schema;

and then add the following line in boot() method of your AppServiceProvider class.

use Illuminate\Support\Facades\Schema;

class AppServiceProvider extends ServiceProvider
{
 /**
 * Bootstrap any application services.
 *
 * @return void
 */
 public function boot()
 {
   Schema::defaultStringLength(191);
 } 
}

This should solve your problem. Just delete all the tables and rerun the migration.

Click here to read more about Laravel.