Tag: WordPress
-
WordPress Options Passed To JavaScript #2
In our first article of this mini series, I explained how to pass with JSON from PHP to JS. Alternativly you can do this with the WordPress function wp_localize_script(), but contains some pitfalls. Therefore this little tutorial, also you should think about it in advance about these two solutions.
-
WordPress Options Passed To JavaScript #1
In WordPress you are not always in the PHP world and so you have to pass settings and data from the database to scripts sometimes. In many Plugins you can find solutions in loading the wp-load.php and therefore access to all features of WordPress. Long ago Otto (Samuel Wood) already referred to this fact and…
-
First or Last Page in Page-Structures of WordPress
Now and then little snippets are pretty useful. For a fix in a Premium-Theme, I needed a kind of evaluation, where I am in the site structure and with little effort I was able to expand the classes and react with CSS. The following code shows the basic for it and get_pages() is the key…
-
Load Minimum of WordPress
A small contribution for all those using WordPress as a backend, framework or something similar. The applications, especially in the B2B sector, becoming more and more, as do the questions. So far, I’ve always liked to recommended BackPress. But even a well-maintained standard is feasible, with all its advantages in the context of the philosophy…
-
Don’t use strlen()
Each time I see someone use strlen() I cringe. It will break. Despite its name, strlen() doesn’t count characters. It counts bytes. In UTF-8 a character may be up to four bytes long. So what happens if we use strlen() and its companion substr() to shorten the title of post? <?php # -*- coding: utf-8…
-
We’ve Lost A Very Good Friend, WordPress Enthusiast And An Important Part Of WPEngineer!
Sadness has descended on WPEngineer last week. Michael Preuß, one of our WPEngineer Team, died suddenly after a short illness and after a memorable life. Frank and I are still in shock and we can’t realize that Michael left us without saying goodbye. He leaves a big gap in our life. He was not only…