Thursday, June 17, 2021

WP - Theme Editor not visible

 If you are asking: Why theme editor is not visible in my WP? or Why I cannot edit functions.php in WordPress? or Why theme editor is missing?

The probable reason is that you have disabled editing files. 

Here are few possibilities how to get your theme editor back:

1. In wp-config.php find following line:

define (‘DISALLOW_FILE_EDIT’, true)

and change it to

define (‘DISALLOW_FILE_EDIT’, false)

2. If you have no access to wp-config.php it means some security plugin blocked this.

In the case you are using iThemes just do following:

- In iThemes Settings go to WordPress Tweaks and enable/disable File Editor - Disable File Editor

Monday, April 26, 2021

WP - Display all tags in a tag cloud

You may have lot of tags but in your WordPress not all tags are displayed in the tag cloud. To display all or more tags there is simple solution.

Go to Appearance->Theme Editor

Then in Theme Files select functions.php.

Add the following at the end:

//Register tag cloud filter callback
add_filter('widget_tag_cloud_args', 'tag_widget_limit');
 
//Limit number of tags inside widget
function tag_widget_limit($args){
 
 //Check if taxonomy option inside widget is set to tags
 if(isset($args['taxonomy']) && $args['taxonomy'] == 'post_tag'){
  $args['number'] = 500; //Limit number of tags
 }
 
 return $args;
}

Save the file.

If you want to display even more tags or less tags then change the number of tags to value which suites you.

If you want this behavior for WP categories then instead of 'post_tag' use 'category'.

Tuesday, July 23, 2019

My new WordPress project

For long time (actually up to few weeks ago) all my projects were developed using Java, Grails and similar technologies. Majority of web applications had big business logic or need serious database access and display logic. The result of that was that actually I had no experience with number of existing tools online. I didn't worry about that as I thought that everything can be done fast and easy using my favorite tools, Java and Grails :)

I must admit that I was wrong. With my wife we have decided that we want to try personal website related to tattoo, tattoo images and number of things related to tattooing. If you want to have a look on the result you can check withtattoo.com.

After consideration I have decided that I will try to go with WordPress. I had no experience before that. So I just created trial account on wordpress.com and have been playing little bit. Very soon you realize architecture of WP as such and start feeling very good about working with it. Soon you need to decide the look and feel. With such amount of free or commercial themes available it is actually hard work to choose :).

When I found a theme I needed some hosting. After initial surprise of low prices very soon I have found that some serious WP hosting costs similar to Java hosting. Around $30-$50. I have decided for WP liquidweb.com hosting. There are no limitations which plugins you need to use, which themes you can install and basically you have full control. To must surprise this was not the case for some strong WP hosting companies even when you pay more. Additionally I have very good professional experience with LiquidWeb as our virtual servers provider in the company.

So basically after choosing WP theme, hosting you start working on website. Soon different ideas are coming how to accomplish different goals. To my surprise there is almost infinite number of available WP plugins to use and those plugin really speeds up your work. SEO, Social media, similar content and more. All this I know how to implement in Java but real enjoyment is that you can achieve same almost without work (again, this is case for simple website not advanced heavy back-end application).

So just my conclusion. If you are thinking about some project, even if you are good software developer, before you start implementing it consider some existing frameworks and solutions. If you choose well and understand architecture behind it you can really do nice things.

So basically, my first WP project is about tattoos and can be found on address withtattoo.com.

Friday, April 27, 2018

Websites and Zones in terms of AdServer

To make it simple regarding websites there are no surprises what is website in the Ad Server platforms technology. As it name implies it is just simply website. Places everybody are visiting daily and place where ads are displayed.

These days when you visit website what will you also see in the most cases are different advertisements. Big banner at the top, video ad in the middle and even some text ads. And this brings us to the second important term in the world of Ad Servers.

Ad Zone

So what is actually Ad Zone?
Ad Zone is unique place where ad is displayed.

So if you take common website most probably on each of the pages you will see ad at the top of the page. Top of the page is header and it is the same header through out the whole website. So this you will identify as one Ad Zone. So no matter on how many pages ad is displayed basically it is just one same place.
So one way of thinking what is Ad zone is to think about unique place where ad is displayed.

But you can also think about ad zones from selling point of view. In this case Ad zone is place on your website which you can rent for real money. And those who rented this place will display they ads on the website. So somebody can e.g. pay you to display his own ads in the header. So header is the ad zone.

Mobile vs desktop
In the pre-mobile era there was no difference between mobile and desktop website. These days this is usually different. So while it is the same website zone is different. You can sell to one partner header on your desktop website and also header to another partner.

In this case you actually have two zones. Mobile header and desktop header.


Tree structure
If we put all these together then actually websites and zones create kind of tree structure. On the top of the structure is website and zones are leafs of such tree. Have a look on the screenshot from the Lite Ad Server platform.


As you can see in the picture above it is obvious that advertising website has 5 different Ad Zones.

Responsibility of ad servers is to display ads in the ad zones.

Sunday, April 15, 2018

Basics of Ad Servers

Although my responsibilities are mainly technical I was lucky enough to also get much more into online sales business. As we are using lot of advertising, banners and ad serving I got lot of experience with that.

When I moved more into advertising I found out lot of new buzz words for me. Some of them are Ad Server, creative, pop-under, A/B testing, zone, ad space, campaign, landing pages...

To my big surprise even number of experienced persons still do have confusion regarding all these. The problem is that online advertising and online sales very often much more looks like magic than something where you can setup some real processes.

Anyway there are some standard rule sets valid for every company which wants to advertise product or service using Ad Server and banners (or better tell creatives).

This brought me to decision to write series of blog posts which will help others to get good understanding into basics of ad servers, ad serving and other commonly used terms in online advertising.

In the next post I will start with basics. We will see what is actually web site and zone in the online marketing. As we get deeper into the matter I will use Lite Ad Server in examples. This way we will be able to see everything mentioned in practice.

Monday, August 2, 2010

Am I getting something wrong? (thinking about OOP)

Maybe I am totally wrong but here is what is in my mind. Most of the books that describe object oriented programming, architecture or whatever are making examples using “objects” like person, cat, mammal and then big hierarchy of classes. Of course, more advance books are explaining why huge hierarchy of classes can be wrong and why it is good to use composition. I will not even try to explain that in this post.

And then having these classes you can read about different aspects of OOP. Some of the examples can be:
dog.bark()
person.walk()
person.openDoor()
engine.start()

And I agree that these are almost great examples (except person.openDoor() where I will come back later on).

So let me try to explain where are I am aiming with me question (in the caption of the post).

For learning OOP these may be good examples but from my experience so far these are cases that I don’t meet so often in practice.

Let try one example. Imagine class Can (not verb but noun). Coming from the examples above one could model method: Can.open(). Uhmmm, is it really possible that Can is able to open itself? I wouldn’t say this is reality.

So what is solution here? Quite straight forward. Model a class CanOpener. Then model method CanOpener.open(Can can). This is now much closer to reality.

But what is Can and what is CanOpener from the programming point of view? Well I would say:
Can - is data
CanOpener - is service

And in most of the projects this is what I meet. Most often you are working with data and then perform something on that data. If you try to model your solution as explained at the beginning of the post you will finish with domain classes that have hundred of methods and probably thousands of lines. But very often domain classes are just data while services are actually performing real work. But be careful not to fall into trap of procedural programming.

So come back to example from the beginning: person.openDoor(). As I mentioned this is not good example. And again I would model this quite differently:
Door
DoorOpener (interface)
Person (implements DoorOpener)

It is clear that doors can be opened by person, but they can be opened by engine or wind. So “item” that is able to open door is again service while door is just class keeping data (entity). And yes, you need to add code to open door into Person but again this can be great situation to use composition.

I hope I successfully explained how I try to model solutions for programming problems.

And just short note at the end. Please do not add Service, Manager or similar words at the end of class name. It can easy trap you into procedural programming as you will place too much responsibility into those “managers”.

Saturday, July 31, 2010

Starting with Startup - Agile Acceptance Challenges

When starting with the agile development (Scrum as base in our case) there are always some challenges that you will meet at the beginning and during the road.

I will try to explain structure of the team and acceptance of different agile parts.

Team
We have started with team of 6 (including me). Two of us already had experience with Scrum, one of us had experience with classical water-fall models and three had no experience with project management models. Few months later the team was extended with the tester.

The structure of the team was (is) following:
3 senior developers - 2 with agile experience and 1 with water-fall experience
1 intermediate developer - experience only with ad-hoc project management model
1 junior developer - no experience with any project management model
1 designer - no experience with any real project management model
1 tester (few months later) - experience with water-fall models

So let see how this team went through agile adoption.
For each part I will split acceptance into three parts:
- with agile experience - acceptance of the team members who had agile experience
- no experience -acceptance of the team members that had no experience with project management methodologies
- water-fall experience - acceptance of the team members that had experience with water-fall project management models.

Writing requirements (user stories)
With agile experience
Team members that already had agile experience had no issues in writing user stories.

No experience
Team members without experience with project management methodologies accepted user stories as the form of writing requirements. At the beginning there were some issues to write user story of the right size (sometimes they were too small or too big) but they got the right form very quickly.

Water-fall experience
In the case of developer user stories have never been really accepted. My feeling was that there was no even wish to understand what is advantage of user stories. User stories were constantly too big (e.g. As admin I can do anything). Actually this colleague have never accommodated to agile development and left the company later.
In the case of tester acceptance of user stories came much faster. For him it is much easier to understand what to expect when user story is implemented. It is obvious that tester prefers user stories than complex use cases or other functional specification.

Estimation
With agile experience
Surprisingly here we needed some time to accommodate. The reason was that I have decided to use story points as estimation method. But the team member with agile experience was used to ideal person days estimation. It was confusing for him for some time. But at the end estimation model with user stories was fully accepted

No experience and water-fall experience
After some turbulences at the beginning estimation model was accepted. The most issues were regarding over-estimation and under-estimation. But with help estimation became better and now is constant.

Meaning of DONE
Meaning of DONE in agile is very interesting. You should finish user story in the way that in the future you should not come back to that user story. User story should be ready for production.

With agile experience
Anybody with agile experience should not have problems to get meaning of DONE. At least that was the case with us.

No experience
At the beginning it was not so clear what DONE means. There were questions like: Is it already DONE? Can I improve this? I have such good idea, can I add it?
All the time I have insisted only on implementing user story and focusing on tasks. Very soon they realized what done means and actually realized why DONE is very helpful.

Water-fall experience
Here situation was much more interesting.
Developer with water-fall model experience had constant problems to get work DONE. There were always small tasks that can be easily finished later. There were always some missing features because they were not specified enough in the user story description. The "wrong" influence of the water-fall could be felt most of the time.
But tester was much happier. He read user story and had understanding what to expect from it. This way he can test and easily see if it is DONE. There are no answers like: I will do it later. It quite simple - if you sent user story for testing everything must work.

Testing
Under "testing" I mean writing unit and integration (as we use Grails) tests. Here situation differs from team member to team member. Some of them understand and know how to write good tests and some of the are still fighting to get the tests right. The most common issues are like:
- writing test that tests too much functionality and spread through number of classes or services.
- writing test that tests method not functionality





Conclusion
My feeling is that team accepted agile development very good. For team members without project methodology experience agile acceptance was easy and what is the most important natural. They have feeling that it is the right way to do the work. The most problems had a developer with water-fall experience. But the proof that having water-fall experience does not mean it is impossible to accommodate to agile is new team member that also came with water-fall experience but is accepting agile approach very good.

What is your experience in accepting agile?