For security, only certain HTML tags are allowed in content and widgets on WordPress.com. However, with our Protected Embeds feature for VIPs, you are able to include iframes, objects and scripts. In addition, VIP Partners can create customized shortcodes – a type of placeholder tag that can optionally accept arguments. For example, say you want to embed […]
Use WordPress’s if you need to get a time that’s adjusted for the site’s timezone setting in the admin area. If you need to work with the timezone offset: Please don’t use date_default_timezone_set(). The timezone in PHP needs to stay GMT+0 as that’s what WordPress expects it to be. WordPress.com Stats and other features are […]
Sometimes the default roles and capabilities aren’t exactly what you need for your site. If you need to create new roles or modify existing ones, we have a bunch of helper functions to assist you in doing this. Please use these functions rather than the traditional methods as this will ensure that your code works […]
As a member of VIP, your theme should have a “Powered by WordPress.com VIP” link displayed. Most people put this link in the footer of their website. Rather than hardcoding this link, we would prefer if you used existing helper functions to do it. This makes it much easier to maintain the link’s URL and […]
To redirect the feed to Feedburner, use vip_main_feed_redirect() from vip-helper.php. For example, you would add the following line to functions.php: This function includes logic for batcache to serve the feed dynamically to Feedburner.
WordPress.com automatically handles images in ways that should help minimize the need to manually perform image resizing, cropping, and optimization: For high-DPI (aka Retina) devices, we automatically serve higher resolution versions of images in most cases; you should not need to upload or reference separate higher-resolution images. (This does not take effect for graphics defined by CSS, canvas, […]
If you need to fetch data from another server, you should remember that doing so is a relatively slow process and that you can run into problems if there are any timeouts. To help you to efficiently and robustly fetch your data, we have created two helper functions that you can use. Both functions are […]
You may want to provide a custom RSS feed, or alter the content of an existing feed. The following examples show how this can be done by using some filters and actions. Custom Feeds To add new feeds to your site, use WordPress’s add_feed() function. It will handle a majority of the under-hood magic for […]