Posts Tagged ‘wordpress’

Tumblr API for WordPress

there are a few assumptions:

  1. you already have your tumblr consumer key, secret, oauth token, and oauth token secret
  2. i used this tutorial as a starting point: http://techslides.com/tumblr-api-example-using-oauth-and-php
    • i didn’t use the callback.php nor the connect.php files in the zip
  3. create a private (password-protected) tumblr blog and set up each editor as a contributor to it
    • private because you don’t want viewers to happen upon the tumblr site (you’ll lose hits on your own site!)

Read the rest of this entry »

WordPress: Broken RSS Feed

This is one of the worst bugs I’ve encountered in a while. The worst because you really don’t know exactly where the issue can be fixed…

If you go to your site’s RSS feed (http://YOUR_SITE_URL/feed), you might see this message:

XML Parsing Error: XML or text declaration not at start of entity
Location: http://YOUR_SITE_URL/feed
Line Number 3, Column 1:
<?xml version=”1.0″ encoding=”UTF-8″?><rss version=”2.0″
^

Vague… i know Read the rest of this entry »

Get the ID of a Post Meta Image

I Google’d and checked the WordPress codex, but could not find a function that would give me the ID of an image I uploaded into a custom meta field.

The Problem

I have uploaded an image, but that image is huge. I want to be able to display the image at my predefined size. There are functions to display the post thumbnail (featured image) in any which way you want, but this is different.

This is the cleanest method I’ve found to get the attachment’s ID. With the ID, you’ll be able to use a function to display that image.
Read the rest of this entry »

Adding the WordPress Uploader to Your Theme or Plugin

There are some tutorials out there similar to this, but WordPress has since updated their media uploader, making those tutorials obselete. This code is essentially a combination of the best ones I’ve found

Javascript

first, you’ll want to save this code into a .js file, say “uploader.js
Read the rest of this entry »