Tag: PHP

  • Use WordPress Post Thumbnail as Background image

    Use WordPress Post Thumbnail as Background image

    Now and then you need in a post or page a catchy image. For editors the thumbnail function is quite comfortable to assign an image to a post or a page. Therefore it is worthwhile to use this picture as a background image for the post. However, it is much better if the image is…

  • Custom Pagination without WordPress Plugins

    Custom Pagination without WordPress Plugins

    On day 9 of our Advents Calendar we show a custom pagination function which allows a user to insert custom next, previous or numbered page links into a post. Use the follow code for an custom plugin or insert the function in your theme, inside the functions.php. Please see the second code-area for an example…

  • Know The Constants Of An WordPress Installation

    Today I will show you how to display the constants you use in your WordPress installation. Here is a small code snippet to list the defined constants.

  • Plugin To Add Custom Field To An Attachment In WordPress

    Plugin To Add Custom Field To An Attachment In WordPress

    The media library is on WordPress in some areas, certainly not perfect, but it has great potential. Each attachment can contain various metadata and also WordPress stores some data directly while uploading – for example a part of the Exif data of an image. However, it might not be enough for you and you need…

  • The PHP Functions min() and max()

    Today a small snippet, which I frequently use in my WordPress Widgets. It is about the determination of minimum and maximum values. Here is a piece of code from the WordPress Widget Recent Comments:

  • Custom WordPress Login-Page

    In a previous post I wrote about the possibility to adjust the login page in your WordPress backend. But I still receive a lot of questions about it and I would like to point out three simple ways, so that you can customize with little effort the login page to your site – a nice…