Month: May 2012

  • 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…