amohwamburu
amohwamburu
WEB 254 blogs
12 posts
Web Authoring
Don't wanna be here? Send us removal request.
amohwamburu · 3 years ago
Text
How to Use WordPress Action Hooks in Theme Customization
WordPress child themes give a relatively easy way to customize the look and feel of a theme. If the theme’s options don’t provide you with adequate design choices, you can just add a new rule to the child theme’s default stylesheet file called style.css. But what happens when you also want to modify the theme’s functionality? That is one of the cases when WordPress actions come to your help.
WordPress has become so popular partly because of its high customizability. The WordPress Core is loaded with different hooks that enable developers to modify or enhance the default functionality. Moreover, we are allowed to include custom hooks in our themes and plugins to help other developers to easily adjust our code to their needs.
About WordPress Hooks
WordPress hooks work somewhat similar to real-life hooks in the sense that you can catch the fish you want at the right spot if you properly use them.
You can remove a caught function (e.g. you can remove the WordPress admin bar for low-level users), you can leave it intact and enhance it with your own functionality (e.g. you can add more menus or widget areas to a theme), or you can override it (e.g. you can modify the behaviour of a core function).
There are two different kind of hooks in WordPress: actions and filters. In this post we will take a look at how we can make use of action hooks in theme customization.
How WordPress Hooks Work
To use a very simple language, actions indicate that something has happened during the WordPress page lifecycle: certain parts of the site have been loaded, certain options or settings have been set up, plugins or widgets have been initialized, and so on.
Filters are different from actions in their nature. They are used to pass data through, and modify, manage or intercept it before rendering it to the screen or saving user data into the database.
At every significant landmark of the WordPress page lifecycle there is either an action or a filter hook to which we can add our custom code to modify the default behaviour to our needs.
The certain actions and filters running during a request depend on which page was requested by the user agent: for example in a single post request hooks related to single posts are available, but hooks related to other parts of the site (e.g. the admin area) aren’t.
0 notes
amohwamburu · 3 years ago
Text
Keeping Up With Java.
Java is one of those languages that you’ve probably met at some point or another. It’s everywhere.
From large enterprise applications like Salesforce to introductory programming classes at university to Android apps on your phone, Java is like your reliable friend in high school who was voted “Most Likely to Succeed” and actually did.
As the years have gone on, Java’s evolved quite a bit. It’s changed its way of thinking, found new ways of communicating and updated its style.
If Java was at your high school reunion, you’d still be able to recognize it – even though it’s gained a few constructs here and there.
Here are some updates that will help you remember who your old pal is:
For-each loop
Java has always had the C-style syntax of for loops:
More often than not, this loop is made to loop through an entire array:
In the original for style loop, the i is initialized to 0 because an array’s first element is 0. The i is smaller than the total length of the array. (Note: it’s using less than [<], not less than or equal to [<=], so it actually stops at 2.) Finally, we increment i for the next bit through the loop. Clear as your memory of high school geometry theorems, right?
Because that style was so common, a new construct was introduced, the for-each loop:
When you encounter the colon, you should read that as “in.” So it’s essentially “for each item in fruit.” Cleaner right? If you didn’t know what that colon was, it might be a little confusing. Any object that can be iterated can be on the right side of that expression. (If you want to give this a spin, in my Java Objects course we loop over the letters in a word during a game of Hangman. Java Objects uses Workspaces, so you don’t need to install anything special on your machine.)
Try With Resources
Oftentimes, you’ll use an object that must be closed after you open it. This type of object is called a resource. A best practice that emerged over time was to use a try and finally block, where you close any resource that had been opened.
Some objects also can’t be closed twice, so you’d also have to remember to check if it has been closed prior. It was a lot to remember.
So again a new construct was introduced, try with resources:
Any resource declared in that first set of parenthesis will be automatically closed. Anything that wants to use this must implement the AutoCloseable interface. Much better, right? (If you’d like to give this a try, in my Java Data Structures course you’ll have the chance to open up a file of tweets to explore the Java Collections Framework. Java Data Structures also uses Workspaces.)
Diamond Operator
The diamond operator is really a way to avoid repeating generic type declarations. But if you didn’t know about it, it probably would look a little weird. The following two statements are synonymous. Long form:
Shorter form: Because the declaration defines the parameterized types, the initialization doesn’t need to repeat the types. The compiler can figure it out. This helps trim off some extra line weight.
Lambdas
Speaking of slimming down, Lambdas are anonymous functions that greatly reduce the noise that’s used to surround inline anonymous classes. Here’s an example of an event handler in the anonymous inline class version:
Here’s the newer Lambda syntax:
You’d hardly recognize the new version. Aged well, hasn’t it?
Hopefully, this post reacquainted you with your old friend Java.
0 notes
amohwamburu · 3 years ago
Text
WordPress.com vs WordPress.org
let’s start by clarifying the difference between a self-hosted WordPress site and a word press.com site
A WordPress site can run on any server that allows it.
You download the software from WordPress.org and install it, or the hosting site does that for you. WordPress plays no role in the hosting.
If you deploy it on your own computer, you can use it any way you want. If you deploy it on a hosted site, the host sets the rules.
WordPress.com uses the same software, but it also provides the hosting and expert customer support for your website. (Most hosts provide no support for your website. They only provide technical support for the hosting itself.) Different plans provide different features.
There are over 54,000 plugins available for WordPress sites. Plugins extend the functionality of your website. Some are free, and others require payment.
If you host your own your site, you can install any of them without restriction. Many hosts give you the same freedom. In WordPress.com, your selection of add-ons is restricted unless you choose the high-end Business plan.
0 notes
amohwamburu · 3 years ago
Text
6 Bad Digital Habits and How to Beat Them.
As much as technology and the internet has benefited us, it has also given us some really bad habits. Here are a few common ones, and how you can kick them.
Bad Email Etiquette
Why it’s bad: If you work in an office, bad email etiquette – such as requesting read receipts, or ignoring emails completely – can frustrate your colleagues.
Did you know?
‘Ping-ponging’, or rapid replies to office emails, is the most annoying habit according to a Kingston University study (2011).
Emailing out of hours isn’t helpful – try saving the message till the next day.
How to stop it:
Keep email content in sync with the subject line – making it easier to find later.
Get to the point quickly – use separate emails for multiple requests.
Being Glued to Your Phone
Why it’s bad: Excessive phone use can lead to sleep disorders and depression.
Did you know?
Over 20% of Americans believe their mobile usage causes marital conflict, according to a TIME study (2012).
17% of users check their phone at a meal regardless of company, according to the same study.
How to stop it:
Turn it off – if that’s too hard, stop using your phone or other gadgets in or before bed.
Set up custom alert profiles – this phone feature vets your notifications to avoid needless distraction.
Obsessive Gaming
Why it’s bad: Like other stimulants, gaming – particularly online gaming – can be highly addictive.
Did you know?
9% of children are addicted to gaming, according to an American Academy of Pediatrics study (2011).
46% of online gamers play Massively Multiplayer Online Role-Playing Games (MMORPGS), making it the most popular online gaming experience.
How to stop it:
Set time limits – modern consoles have password-protected controls to limit gaming time.
Alternatively, try finding a walkthrough or cheats for the game online. That way, you’ll complete the game sooner.
Social Media
Why it’s bad: If used incorrectly, it can be a huge waste of time. 121 billion minutes were used up on social media sites by Americans in July 2012!
Did you know?
40 minutes a day – the average time Americans spend on Facebook. That’s over 243 hours a year.
500m tweets are sent each day by Twitter’s 271 million active users.
How to stop it:
Delete or deactivate your accounts – or just let them drift off into obscurity by posting less often.
Download StayFocused – this Chrome app cuts off access to time-wasting websites.
Pornography Addiction
Why it’s bad: It’s claimed that watching online porn can lead to issues with secrecy, depression, anxiety and relationship problems.
Did you know?
64-68% of young adult men view porn at least once a week
9% of porn viewers have tried unsuccessfully to stop.
How to stop it:
Consider joining Reddit’s ‘NoFap’ community – an online meeting place for people who abstain from porn.
Alternatively, use internet filters as a deterrent from seeking out pornography.
Failing to Back up Data
Why it’s bad: Your computer and devices aren’t bulletproof. Malware, power surges, hardware failures and natural disasters can all leave you without your precious files.
Did you know?
Only 23% of small to medium-sized businesses (SMBs) back up data daily.
50% of SMBs only start backing up data after a catastrophic loss.
How to stop it:
Create physical backups – copy all of your music, videos, documents, and pictures on to a hard disk.
Alternatively, back up all your devices to an online storage ‘cloud’.
Whether you’re a gaming addict or glued to your phone, don’t let bad habits take over your life. Follow these tips and you can end your digital-dependence.
0 notes
amohwamburu · 3 years ago
Text
Tumblr media
WordPress on Speed.
Follow these steps to keep your WordPress blog at the top of its game.
1 Get rid of unnecessary plugins. You can give your WordPress a little speed boost by removing all inactivated or less useful plugins that you may have hanging out in your folder.
2 Adjust your WP built-in cache. Your WordPress blog can get a small boost in speed from a very simple adjustment. WordPress automatically caches many types of database queries as files on your disk, which can bog down your CPU.
3 Get a WordPress caching plugin. Instead of using built-in WordPress caching, try out this useful plugin. It’s can make your site more efficient, responsive, and noticeably faster.
4 Choose the right web-host. While having your own top of the line dedicated server is nice, not everyone can afford it. There are less expensive options that will give you dependable hosting and keep your blog up and running smoothly.
5 Employ mirroring. You can keep your WordPress blog from going offline by employing mirroring.
6 Get better hardware. If you’re running your blog on an old, outdated PC, you’re asking for trouble. While you don’t necessarily need a top-of-the-line machine to run your blog, it doesn’t hurt to have a system that gives you a little room to breathe. Consider adding extra RAM to speed things up, or if you have the funds, invest in a faster CPU.
7 Use up-to-date software. While it may seem pretty obvious, make sure you’re using the newest version of any software you work with. Often, improvements have been made that can greatly speed up the performance of the program.
8 Maximize your server architecture. The amount of traffic your blog gets can determine the best way to set up your server. For some, it may be better to run everything on one box, but for others, splitting up the components into different boxes can speed things up.
0 notes
amohwamburu · 4 years ago
Text
8 tips to consider to build a website from scratch.
Tumblr media
1. Pick!
Choose what you want to put into practice, like writing a CV, Portfolio, or landing page about a particular service offering.
2. Would you please not focus on how it looks at this stage?
Take that pressure right off! You will get to "glow up" your website soon, but you just need to get the structure and content sorted at this stage.
3. Rough it!
There's a reason for the word draft; it's a rough copy of your brilliant idea soon to come to full fruition. Think of it as a rough diamond soon to be polished.
4. Think about the structure
You can always look at other websites you like for inspiration but keep it simple to start with. For example, think of where you want the main navigation to be and what you want in the footer. Honestly, many of us developers just grab a pen and paper and quickly draw to imagine the basic layout (many of us still draw worse than 7-year-olds, so don't expect a masterpiece; you don't need it here).
5. Practice your copywriter skills
You can totally add some filler lorem ipsum at this moment, buuuut if you feel your creative juices flowing, just roughly write them out. This will save you from going back as the text will be there, ready and waiting. Also, if you, for example, choose to practice your Portfolio, think about a few lines regarding what you do and who you are and the areas you work and your work and education experience.
6. Check some design references beforehand.
Do some visual inspiration research. When it comes to CSS, you'll have to think about the design itself, like width, height, margin, padding, position, background colour, font size, etc. So we recommend you visit some websites you like as a reference point or benchmark to have a clearer visual concept.
7. Do it by watching our webinar :)
Allow us to assist you! Trust us, it's way easier, and we are really friendly :). So we are sure that the learning experience will be fun and easy to absorb rather than reading and trying everything yourself. Our webinar is almost like a private class, and you will be done in just 60 minutes!
8. Celebrate!
Oooh yeah, ya did it! Whatever it looks like, you have taken a giant leap! And so to make this process more enjoyable, it's time you celebrated! Glass of wine? Boogie in your room to your favourite song? Hug someone you love? Whatever it is, we strongly encourage it!
0 notes
amohwamburu · 4 years ago
Text
CSS IN DEEP
Today’s post will focus on some of the useful CSS authoring tools that Web designers and developers can use to design CSS layouts for modern browsers. Most of these tools will allow you to design basic CSS layout, test it for different browsers and then progressively implement support for different versions of these Web browsers. The idea of using CSS authoring tools for designing CSS layouts is to allow you to create a solid design with appropriate mark-up and then add advanced styling and perhaps scripting. It results in web pages that are usable by all browsers. A powerful CSS authoring tool also allows you to separate design from content and focus on designing standardized CSS layouts.
useful CSS authoring tools: 
Useful CSS authoring tools.
1.Flux
Flux is an advanced HTML5 Web Design application, capable of creating stunning sites from scratch. Flux isn’t a template based solution, it’s a creative design environment. Flux has comprehensive support for HTML and CSS, including Image Maps, CSS Gradients, custom fonts, and almost everything else.
2.Style Master
Style Master is the leading cross platform CSS development tool. Much more than just a text editor, Style Master supports your workflow – including creating style sheets based on your HTML, live CSS editing of PHP, ASP.NET, Ruby and other dynamically generated sites and editing CSS via ftp.
Espresso
Espresso was a CSS editor called CSS Edit before. You might have heard of it, as it was quite popular back then. Macrabbit developed it further into Espresso, an app that turbocharges your workflow with a perfect blend of features. The application works quicker than average, has syncing and quick publish features coming with by default and it is for much more than just CSS, working pretty much for everything else (it supports JavaScript, PHP, Ruby, Python, Apached and Markdown).
Web Developer
The Web Developer extension adds various web developer tools to the browser.
Notepad++
Notepad++ is a free source code editor and Notepad replacement that supports several languages. Running in the MS Windows environment, its use is governed by GPL License.
Based on the powerful editing component Scintilla, Notepad++ is written in C++ and uses pure Win32 API and STL which ensures a higher execution speed and smaller program size. By optimizing as many routines as possible without losing user friendliness, Notepad++ is trying to reduce the world carbon dioxide emissions. When using less CPU power, the PC can throttle down and reduce power consumption, resulting in a greener environment.
Bluefish
Bluefish is a powerful editor targeted towards programmers and webdesigners, with many options to write websites, scripts and programming code. Bluefish supports many programming and markup languages, and it focuses on editing dynamic and interactive websites.
0 notes
amohwamburu · 4 years ago
Text
My first time to learn FLEXBOX.
I have never done coding all my life even during my degree (back in Kenya). But lec Murphy made me understand coding can be easy as ABCD. So today the lec introduced another coding called Flexbox . I swear it was pain in my butt for most student in my class. Do not fret thru i really ant walk through  all you need to know.
So, let’s get started.
CSS has evolved a lot over the past few years. Designers loved the introduction of filters, transitions, and transforms. But something was missing. Something we all craved.
The problem of crafting intelligent page layouts with CSS seemed to have persisted for too long, and this got many of us writing hacky CSS.
We always had to deal with floats, table display hacks, and the consequences they brought. If you’ve written CSS for sometime, you can probably relate to this. And if not, welcome to a better world!
It seems like our prayers as designers and front-end developers have finally been heard. This time, in grand style.
Now we can all ditch those hacky CSS tricks. No more incessant use of floats, table-cell displays.
It’s time to embrace a cleaner modern syntax for crafting intelligent layouts. Welcome the CSS Flexbox model.
This is the first question everyone asks, and the answer is much simpler than you may have expected.
To start using the Flexbox model, all you need to do is first define a flex-container.
Okay, did I make you more confused there? Let me explain.
In regular HTML, laying out a simple list of items takes this form.
f you glanced at that, you must have seen that the unordered list, ul houses the list elements, li.
You’d call the ul the parent element, and the li the child element.
To use the flexbox model, you must make a parent element a flex container (aka flexible container).
You do this by setting display: flex or display: inline-flex for the inline variation. It’s that simple, and from there you’re all set to use the Flexbox model.
Told you it wasn’t as difficult as you expected.
0 notes
amohwamburu · 4 years ago
Text
My first time to learn CSS and HTML as a beginner.
September 2020,I started learning HTML5 and CSS3 through Mr Kimotho I didn’t  have any basic knowledge about HTML and CSS language. I really started from the ground, hence my slow progress was expected.
I finished the lessons after 5-6 months and not even completing the Projects. After the lessons, there are five projects that you must complete in order for me to gain the certificate. And I was so disappointed that I only finished one project and I couldn't accomplish the rest of them.
Extremely frustrated, I decided to jump into learning JavaScript. I know. A big mistake. I knew my progress was way too slow compare to others and I was bothered by it. Big time. And so I forced myself into JavaScript.
I bought a course on Udemy which was the Web Development Bootcamp by Colt Steele. I didn't finish the course, I made it halfway through. Then looked for another Javascript resources and stumbled upon this free introduction course of Js by Udacity.
I managed to finish it but didn't quite understand how to use them. Instead of gaining more understanding, it made me more confused. I momentarily gave up learning how to code for a couple of months. Thinking that it's just not for me.
And trust me, there were a lot of moments like this. But the thought of learning won't leave me. I'm not a believer in forcing something. It's just a fact that something will work for you and somethings won't.
There's something that I have realized. That discontinuing my journey in learning to code was somewhat forceful. I think it is in times like these that we go back to the reason why we do things we chose to do.
When I finally reminded on why I decided to learn how to code. I went back to learning from the very beginning. Yes, I started re-learning the markup languages. This time it was fun and it felt more natural.
I gained clarity, it's rewarding and enjoyable. Very different from the first time I did it. Now I utilized a lot of resources that helped me understand more and be more comfortable in what I'm learning.
I think it's impossible to have only one source on learning how to code especially when you are an absolute beginner. There are tons of properties and it's just not possible to cover them in one course.
Even after gaining this confidence, I continue to challenge myself to learn and relearn things.
0 notes
amohwamburu · 4 years ago
Text
HTML5
HTML5 is the latest version of HTML programming that allows better management of the web application or the website contents. While HTML doesn’t allow support for Video and Audio data in the programming language, HTML5 allows any kind of data to be incorporated into the program. 
Merits of HTML5 include;
1 Extension of video to a wide range of platforms .
2 Cost effective Multi-Platform Development.
3 Good page ranking.Offline browsing.
4 A better user experience 
5 Consistency across multiple browsers.
6 Better mobile access to Business Intelligence.
Demerits of HTML5 include;
1 If we need to write long code for making a webpage then it produces some complexity. 
2 Need to write a lot of code for making a simple webpage.
3 Security features are not good at HTML.
What are the main features of HTML5?
Cleaner and more Improved Code.
Better Semantics.
Enhanced Uniformity.
Mutuality.
Well-Designed Forms.
Ensures Better Accessibility.
Better Offline Browsing.
Build Customized Web Applications.
2 notes · View notes
amohwamburu · 4 years ago
Text
What is CSS?
CSS is not a programming language like HTML. It's also not a markup language. CSS is a style sheet language. CSS is used to style HTML elements selectively. This CSS, for example, selects paragraph text and changes the color .
We then have a set of curly braces { }. Inside those will be one or more declarations, which take the form of property and value pairs. Each pair specifies a property of the element(s) we are selecting, then a value that we'd like to give the property. Before the colon, we have the property, and after the colon, the value. CSS properties have different allowable values, depending on which property is being specified. In our example, we have the color property, which can take various color values. We also have the font-size property. This property can take various size units as a value
h2 {
      color:blue;
      font-size:6em;
    }
P {
    color:red;
   {
0 notes
amohwamburu · 4 years ago
Text
HTML
elements of html include: 1- paragaraphs
                                        2- Headings
                                        3- Images
                                        4- Links.
Tags are used to start and end an element.
A Tag is made up of a less than character and a closing greater than character.
<! DOCTYPE HTML> is always used at the start.
Eg;  <!DOCTYPE HTML>
       <HTML lang = “en”>
       <Head>
              <title>       </title>
      </Head>
      <Body>   </Body>
      </html>
0 notes