Posts Tagged ‘Functions’

We are pleased to present below all posts tagged with ‘Functions’.

WordPress Shortcodes: A Complete Guide

WordPress shortcodes were introduced in version 2.5 and since then have proved to be one of the most useful features. The average user acting as editor has the ability to publish dynamic content using macros, without the need for programming skills.

When a shortcode is inserted in a WordPress post or page, it is replaced with some other content. In other words, we instruct WordPress to find the macro that is in square brackets ([]) and replace it with the appropriate dynamic content, which is produced by a PHP function.

Read more...

Inside The WordPress Toolbar

The WordPress Admin Bar, first introduced in version 3.1, debuted to mixed reactions. A Google search for “wordpress admin bar” returns multiple articles about how to disable or remove it. Version 3.2 of WordPress introduced new features and functionality, and version 3.3 has not only further enhanced it but integrated the header of the admin section into the bar itself.

Inside the WordPress Toolbar

Since this feature is not going anywhere and it figures largely in WordPress’ plan to implement front-end editing, I think we would all benefit from looking at where its features come from and how best to make this sometimes controversial feature work for us.

Read more...

Limiting The Visibility Of Posts In WordPress Via Usernames

Controlling who is able to view a post is a simple task once the system is established. Limiting access to certain users has several advantages, ranging from a design studio distributing artwork among various clients, or a small school arranging to have its students' homework posted online through a cheap and easy solution.

Limiting The Visibility Of Posts Via Username

The easiest method to get this system working is to make the receivers of the information subscribers (since they will not be able to post), and the distributors of information authors (since they can only edit their own posts). This system eliminates several headaches for a website owner by managing who has access to specific posts. The username will be used for identification of who is allowed to view certain posts since it is unique and, for the most part, constant.

Read more...

WordPress Multisite: Practical Functions And Methods

Multisite is a powerful new feature that arrived with the release of WordPress 3.0. It allows website managers to host multiple independent websites with a single installation of WordPress. Although each “website” in a network is independent, there are many ways to share settings, code and content throughout the entire network.

WordPress Multisite: Practical Functions And Methods

Since the beginning of the year, I’ve been developing themes and plugins for a WordPress Multisite-powered content network. During that time I’ve learned many powerful tips and tricks unique to Multisite. This guide will introduce you to a few Multisite-specific functions, along with real-world programming examples that you can begin using today. Hopefully, it will open your eyes to a few of the new possibilities available in Multisite.

Read more...

WordPress Essentials: The Definitive Guide To WordPress Hooks

If you’re into WordPress development, you can’t ignore hooks for long before you have to delve into them head on. Modifying WordPress core files is a big no-no, so whenever you want to change existing functionality or create new functionality, you will have to turn to hooks.

wp-hooks-guide

In this article, I would like to dispel some of the confusion around hooks, because not only are they the way to code in WordPress, but they also teach us a great design pattern for development in general. Explaining this in depth will take a bit of time, but bear with me: by the end, you’ll be able to jumble hooks around like a pro.

Read more...

How To Create Custom Post Meta Boxes In WordPress

What seems like one of the most complicated bits of functionality in WordPress is adding meta boxes to the post editing screen. This complexity only grows as more and more tutorials are written on the process with weird loops and arrays. Even meta box "frameworks" have been developed. I'll let you in on a little secret though: it's not that complicated.

sm-wp_meta-boxes

Creating custom meta boxes is extremely simple, at least it is once you've created your first one using the tools baked into WordPress' core code. In this tutorial, I'll walk you through everything you need to know about meta boxes.

Read more...

Extend WordPress With Custom Fields

WordPress' popularity has grown exponentially as of late. This rise in popularity is due in part to WordPress' custom fields. Custom fields allow you to add little bits of data to posts. They have changed the way people look at WordPress. A couple of years ago, WordPress was a blogging platform — a good one, but a blogging platform nonetheless. Now it's widely considered to be an excellent simple content management system. How did it evolve so quickly? Custom fields, that's how.

Screenshot

How exactly did these bits of data transform WordPress? The fields could initially include the weather — as the codex points out — the temperature and various other not-particularly-useful things. And that was the story for a while. Then people started to realize that they could use the custom fields to store URLs of images. They could then pull these images to the home page to create magazine-style layouts. These magazine themes, as they became known, evolved, and eventually you were able to pull images automatically from posts. You can draw a direct line from WordPress' popularity to the magazine themes to custom fields.

Read more...

↑ Back to top