While developing my website I frequently got warnings. The one below means WordPress tried to access the property slug of an object that doesn’t exist (is null) and, as mentioned elsewhere, this usually happens when a menu, a snippet or other piece of code references a category that no longer exist.
Attempt to read property “slug” on null
While developing my website I frequently got warnings. When WordPress tries to access the property slug of an object that doesn’t exist (is null), it throws the following (or similar) warning: This usually happens when a menu, a snippet or other piece of code references a category that no longer exist. This means somewhere in […]
Add action button in WordPress code editor toolbar
Most of my website posts that include code use syntaxhighlighter to nicely format code. Unfortunately, you have to manually tag the piece of text as code. I thought it would be nice to have one or more buttons in the classical editor toolbar that will automatically surround the code with needed tags to be displayed […]
How to embed script in wordpress footer
Another “tip of the day”. I ran into this while testing some carousels and swiping banners. All needed the associated js scripts to be loaded lastly after the main page/ post content was already available. It seems that using wp_enqueue_script last argument as true will do the trick: Hope you will find this useful. Cheers […]
Why CSS margins collapse
While working on my new theme for this site I ran into a problem: CSS collapsing margins. Well, from the beginning let me be very clear: this will not be a comprehensive article on this subject. There is already one written by Josh Comeau and is excellent: “The Rules of Margin Collapse“. I urge you […]
Missing WordPress Link Manager
WordPress users that updated the blog platform to version 3.5 might have observed that the link manager is missing from the admin pages: It seems that WordPress announced this as one of the major core changes when they released version 3.5: One other major change is the Link Manager. If you’re using it, you’ll want […]
Using arrays of checkboxes to store and retrieve WordPress options
I am into a complex task: for some time I’ve wanted to update the theme of this site and make it more versatile. Despite my obvious lack of time, the content is increasing steadily, so is the number of visitors, and I feel more and more often the need to structure better all these posts […]
Redesigning the blog
I decided a need a new theme for this blog. Rolled my sleeves and started to work.
How to create Arduino brush for Syntax Highlighter
For my Arduino lessons I needed to add WordPress support for Arduino syntax highlighting. A custom brush for SyntaxHighlighter plugin that would format and color my Arduino syntax similar to the application (see here an example). This is what I did.