The program absolutely runs in copy paste


Customize wordpress bogo plugin’s short code




Hello everyone, It’s me candle.
In this time, I will show you how to customize wordpress bogo short code.
The items to introduce are these.

  • The flag display or hide
  • Change the text

Related article

How to change the language form “en-US” to “en” by wordpres bogo


WordPress bogo has been installed
You can edit the theme of wordpress


The flag display or hide

Bogo’s short code will show links to other languages.
The flags will be displayed automatically.

In some cases, you don’t need flags.
Let’s hide it.

Open the functions.php in each theme’s folder.
It is generally in the following place.

wp-content/themes/”theme name”/functions.php

Write it.

add_filter( 'bogo_use_flags','bogo_use_flags_false');
function bogo_use_flags_false(){
 return false;

You return false with add_filter, the flags will be hide.

It’s seems good.

Change the displayed text

For example, if you change the language from en-US to en,
you feel strange that English text is still “English (United States)”.

From here, I will show you how to change the text from “English (United States)” to “English”.
Of course, you can also change the something another letters.

Open the functions.php and write this.

add_filter( 'bogo_language_switcher','replace_bogo_text');
function replace_bogo_text($output){
 return str_replace(' (United States)','',$output);

Actually this function is quite a power technique.
It replaces the whole result generated by [bogo].
I tried to find out the more smart method, but I think that this is the best for now.

You can see that the text is changed.

Change the short code from the foundation

There is a method to change from the fundamentally rather than a change like a patch.
That method is to override the function to generate short code in the bogo plugin.

When large-scale changes, you can customize more finely using this method.
Although I don’t write it in this article, it is written in the following site in detail.

(It is written in Japanese)


Enjoy your wordpress life.


If you think this article is good, share it please




Your email address will not be published. Required fields are marked *


React Project development environment building command create-react-app is too convenient

English 日本語 Abstract Hello everyone It’s me candle. In this time we will build a “react” development environment with create-react-app command and try to hello world. Past react development was created by installing babel and other packages from npm on your own using gulp or webpack. Past react development installed babel and other packages from npm and built servers with gulp and webpack. If you use the create-react-app command, you can create react environment easily. Let’s do it. Precondition Node is already installed

I created docker shortcut command with bash alias

Abstract Hello everyone it’s me candle. I will introduce easy operation of the docker command. Of course, I just created it thinking that it was useful, so please change it for much more useful. Precondition You use bash. ( Even though you use zsh or csh or something else, you edit a bit, it will work well) You use docker

React Native slows down when debugging on Google Chrome

English 日本語 Abstract Hello everybody, It’s candle. This time, we will solve the problem that using simulator is going to slow down when debugging on the Google Chrome Anyway, It is solved in a simple way. we use Chromium instead of Google Chrome. Premise React development environment has been established

How to change the language form “en-US” to “en” by wordpres bogo

English 日本語 Abstract Hello everyone, It’s me candle. In this time, I will show you to customize bogo plugins. The bogo is wonderful plugin which can adapt the wordpress site to many languages as a simple. but, there is a problem that you can’t choose general English. When writing English articles, you may not always have to write it limited to country. However, you can choose ‘en-UK’, ‘en-CA’ and ‘en-US’, but ‘en’ can not be chosen in bogo. I checked the source code. The bogo got a language list from wordpress function, and there is no general English in it. …


I work in the venture company as a CTO. I start to write program in University, first I learned java, C++ and PHP. In the company, I'm developing web services by Rails. I do like to automation.