Bubble is here!

 

Until not long ago when creating themes for WordPress I made the serious mistake of trying to create everything from scratch, and from scratch I mean from take care of using correct semantic tags to having a file structure as clean as possible avoiding structure duplication in files.

I also have to add that the structure of my functions.php files were very poor, which led me to lose the benefits of using a CMS like WordPress, for example the functions wp_enqueue_style and wp_enqueue_script to name a few. All this happened to me I think due to my little interest (or ignorance) about the projects or repositories with existing boilerplates in large communities like Github.

Recently I have had the opportunity to continue projects started by other people or to maintain other themes for WordPress, there I have known projects like _s or FoundationPress which already offer a good enough base or that are a good starting point to consider when creating themes for WordPress , so I decided to create Bubble,

Bubble is a personal project, a fork of _s, by default the structure of Bubble is integrated with Bootstrap, so you will notice that the menu for example has a walker to show the menu with the structure of WordPress. The layout is also structured with the Bootstrap classes.

Bubble on Github

 

How to use dashicons in your wordpress theme

Dashicons are the official icon font for WordPress and that you can use it in your theme, if you don’twant to use fontawesome or another icon set this is a good alternative.

To use it on you theme just add Dashicons on your functions.php file

function.php

//Enqueue the Dashicons script
add_action( 'wp_enqueue_scripts', 'load_dashicons_front_end' );
function load_dashicons_front_end() {
wp_enqueue_style( 'dashicons' );
}

You can refer the icons in your CSS like:

style.css

.my-class {
content: "\f147";
}

To see all the set available visit the WordPress Developer Resources

How to make a template message for Git commits

At work finally I am using git properly(Or I think), I mean, now I understand how to use branches anytime that a new feature shows up or a bug has to be solved, and how I mentioned at Twitter I know that we are in 2017 and I should been using git since a lot time ago but since I’ve take new jobs I really have the opportunity to use git at my new jobs.

Every time I notice more and more benefits about use git, for example, I just notice that you can create a message template for any time that you make a commit. Thus this feature allows you to keep a standard for your team of codeers when they need to write a commit message, like have s title, description and issue address by.

This post shows how to configure your repo to create a commit message template so you can have a standard for your commit messages.

In the root folder of your project create a .gitmessage file and add the next content:

Some awesome title

Why:

* ...

This change addresses the need by:

* ...

Now using the console in the root of your project folder type:

git config commit.template .gitmessage

Yaaaay! Now you are ready to make c00l messages anytime you have to make a commit.

Tip: You can set a template message globally just typing –globally before commit.template

git config --global commit.template .gitmessage

To unset the global template commit type:

git config --global --unset-all commit.template

References: