• Skip to content
  • Skip to primary sidebar

Trisha Cornelius

Figuring it out as I go

  • Blog
  • Mental Health
  • Motherhood
  • Development
  • Design
    • Design Portfolio
  • Miscellany
  • About Me
    • Bucket List
    • About Me – old
      • Newer old about me :)
    • Privacy policy

Hello 2017

The last two months have been an incredibly tough time for me. I am a bit cross with myself for not acknowledging that it was going to be so tough. For not blocking out 19  November to 16 January as being a difficult time and marking it off for self-care. But as life goes on, I live and learn.

It was my first Christmas as an orphan…but I am grateful that I have an amazing chosen family, my in-laws and my child’s God Parents. That I have people who I can be honest with, that will let me have a good cry on the couch and then bring me tea and cheerfully joke with me, and love me at my best and worst, and every stage in between.

I don’t know if I just got burnt out. It is inadvisable to be working, worrying about a police investigation, supervising an estate’s executor, organising a conference, grieving, mommying a toddler, managing a house while your helper is on maternity leave, being a wife and I am sure there is something else without having more help. But this is changing. My mind is foggy, my body strained. But I survived, and 2017 is off to a much better start than 2016.

Twenty-sixteen was the most difficult year of my life, and I think that it might be the year that I learnt the most from. I did not achieve the goals that I set out to, but then life happened in a different way and I got other stuff done instead.

I have a top secret list of things that I want to achieve this year (and include the reason that I am writing a blog post twenty minutes before midnight on a Saturday night). I don’t know if I will manage a fraction of it. What I do know is this. I would rather try and fail than succeed at not showing up.

January 7, 2017 by Trisha Cornelius

Filed Under: Miscellany Tagged With: 2017, burn out, chosen family

WordCamp Johannesburg is happening!

Hello friends,

wapuuWordCamp is a global but community organized conference about all things WordPress.  WordCamp Johannesburg is happening on Friday 18 November and Saturday 19 November 2016 at the BON Hotel in Midrand.

A WordCamp is a great opportunity to connect with other people who use WordPress. At the moment about a quarter of website’s on the Internet are powered by WordPress. There are many reasons for this, including the fact that WordPress makes publishing accessible to the masses and has removed the barrier of technical knowledge to running your own website.

WordCamps are for everyone who uses WordPress whether you simply have a toe in the water by just starting a blog or are a high-end developer contributing to the core software that makes WordPress great.

I was lucky enough to attend WordCamp Cape Town this year (I will blog about it yet) and it was a wonderful experience to meet members of the community and I learned a great deal.

If you can’t make it for both days, at R250 a ticket (including food) is still worth coming for the one day! I would love to meet you at WordCamp.

Love and WordCamp Johannesburg,
Trisha

If  you would like to read more about WordCamp you can have a look at:

  • WPBeginner has an article about What is a WordCamp and why you should attend one?
  • Reasons why everyone should attend a WordCamp by WP Multi User

October 24, 2016 by Trisha Cornelius

Filed Under: Miscellany Tagged With: Community, WordCamp, WordCamp Johannesburg, wordpress

The Turtle Moves

Hello Computer 🙂

The WordPress ecosystem works with an interaction between three components. The WordPress core, themes which change a website’s appearance and plugins which modify functionality.

At WordCamp Cape Town I attended a workshop presented by Jonathan Bossenger on writing your first WordPress plugin, and I set myself the deadline of 30 September to write my first plugin “The Turtle Moves” which is going to populate the end of posts with a random quote from Sir Terry Pratchett from a pre-defined quote collection. (Upon reflection I decided that the end of posts meant the very end after the loop has finished, and after the comment section.)

To start with I started reading the Codex’s documentation on Writing a Plugin and looking through Matt Mullenweg’s Hello Dolly code.

A WordPress plugin needs only one PHP file with a specifically formatted DocBlock. The Header requirements are handily listed in the WordPress Developer Plugin Handbook. The only requirement is to have the plugin name.

So, I started off by writing the header comment, in a file that I named the-turtle-moves.php I saved it in a local website in the plugin directory. As a plugin is a collection of PHP scripts, I opened my file with a <?php tag.

I adopted the approach that if I was not familiar with the function included in the plugin I hit the PHP manual docs, and so I also learned about mt_rand and explode as built-in PHP functions.

While my end goal was to have the plugin add a quote at the end of a post I decided that for the purpose of testing the initial functionality I was going to mimic Hello Dolly and have the quote echo on the admin screen. This was a good decision because it allowed me to copy some of Matt’s code directly, and when I got parse errors that prevented me from activating the plugin it kept me on an even keel without going down an anxiety spiral. Both parse errors that I encountered were caused by missing semi-colons, and I am grateful to the helpful contributors to Stack Overflow which pointed me in the right direction to debug.

After resolving those issues the biggest challenge that I had was finding the correct filter to use to insert the quote into the site. A problem that I had a couple of times is by using the filter I ended up removing other WordPress functionality, (e.g. the actual post content or the entire comments section). The moral of the story is that I need to learn more about WordPress action and filter hooks.

Once I figured out that the correct code was an action hook onto “after_loop” it was smooth sailing. I then zipped up my plugin and loaded it onto a different local test site where it worked as intended. I am proud that I got this plugin done. It is nothing spectacular but it was a very good first step into plugin development and getting an understanding of how plugin development works. If you are so inclined you can check out The Turtle Moves on GitHub.

Love and plugins,
Trisha

September 30, 2016 by Trisha Cornelius

Filed Under: Development Tagged With: learning exercise, plugin development, Terry Pratchett, The Turtle Moves, wordpress

The fields of learning and performance are an exploration of greyness

There is the careful balance of pushing yourself relentlessly, but not so hard that you melt down. Muscles and minds need to stretch to grow, but if stretched too thin, they will snap. A competitor needs to be process-orientated, always looking for stronger opponents to spur growth, but it is also important to keep on winning enough to maintain confidence. We have to release our current ideas to soak in new material, but not so much that we lose touch with our unique natural talentd. Vibrant, creative idealism needs to be tempered by a practical, technical awareness. 

September 16, 2016 by Trisha Cornelius

Filed Under: Miscellany Tagged With: Josh Waitzkin, Reading, The Art of Learning

Programming is a craft.

At its simplest, it comes down to getting a computer to do what you want it to do (or what your user wants it to do). As a programmer, you are part listener, part advisor, part interpreter, and part dictator. You try to capture elusive requirements and find a way of expressing them so that a mere machine can do them justice.You try to document your work so that others can understand it, and you try to engineer your work so that others can build on it. What’s more, you try to do this all against the relentless ticking of the project clock. You work small miracles every day.

It’s a difficult job.

Andy Hunt & David Thomas, The Pragmatic Programmer.

September 12, 2016 by Trisha Cornelius

Filed Under: Development Tagged With: advice, Pragmatic Programmer, Quotes

A very basic guide to hooks, actions and filters for WordPress.

Part of WordPress’s power is the fact that it is so extensible. The tools in the WordPress toolbox to achieve this are hooks, actions and filters. But some of the documentation can be very intimidating, so in less than 200 words I will provide you with a basic guide to WordPress hooks, actions and filters.

Hooks simply refer to where your custom code will be executed.

There are two types of hooks: action hooks and filter hooks.
Action hooks do something in your code. (You can either add or remove actions using the very handy and intuitive code: add_action or remove_action)

Filter hooks modify something in the code, so instead of doing something entirely new or different…it simply changes your code. The very intuitive code to add a filter is: add_filter.

That’s it, a very basic guide to hooks, actions and filters for WordPress.

Read more:

  • Tuts Plus: The Beginner’s Guide to WordPress Actions and Filters
  • WordPress Actions, Filters, and Hooks : A guide for non-developers
  • WordPress’s Hooks Reference
  • WordPress’s Action Reference
  • WordPress’s Filter Reference 

September 8, 2016 by Trisha Cornelius

Filed Under: Development Tagged With: beginner tutorial, wordpress, wordpress actions, wordpress filters

  • « Previous Page
  • Page 1
  • Page 2
  • Page 3
  • Page 4
  • Page 5
  • …
  • Page 21
  • Next Page »

Primary Sidebar

  • Home
  • Blog
  • Miscellany
  • Motherhood
  • Mental Health
  • Development
  • Design

  · Copyright © 2018 · Patricia Cornelius ·

  · Built on the Genesis Framework for WordPress lovingly customized by Trisha Cornelius ·