Articles of customization

Last time a user logged in

I’m building a site where users log in to view content specific to them. I would like to display the last date and time they logged in. How would I get this information from wordpress? If it doesn’t exist, how could I add it? Example: Welcome Back! Your last visit was on 10/25/2010 at 3:14pm. […]

Hide a page in the admin end without a plugin?

I’m creating a series of pages with iFrames embedded in them, but it seems the only way to do this within WordPress (i.e. using the templating system) is to create pages in the admin end and then create individual templates for each of those pages. Is it possible to hide those pages from the admin […]

How to add custom template tag in wordpress theme?

I am working on a WordPress site, it’s an online newspaper site. The theme I am developing, I want to add custom template functions like get_footer() or get_header(), so that I can save those HTML and PHP codes like the way footer.php stores. Thanks in advance.

Creating a custom Admin panel

I’m building a WordPress Plugin and it has two tables and some data. Right now, for displaying and changing the data, I’m using the wpdb function and manually creating the user interface (mimicking the Default one). However, I see that other plugins have a more consistent style with their tables and the same features (like […]

Get the post attached to a image attachment

Assuming I know the image attachment ID, how can I get the post permalink to which is attached (if any) ?

Adding Pagination on a Custom Author Page

i have created a custom author’s page that list the title of their posts. but the problem is i can’t get the pagination to work if it’s beyond the set post per page value. i have used get_posts() to it’s custom loop. <?php $ppp = 5; //set my custom number of post to appear $uid […]

How to get multiple Action Hooks in an Array

Hi I am writing a small plug-in which I get some content from outside of WordPress and I want a small script to trigger whenever a new post, page or comment is added. Also if any Widgets, themes and Plug-ins are Activated or De-Activated. My guess is that I should be using the action hooks […]

How do I add JavaScript that will execute on all my sites in Multisite?

We are creating an internal network of sites using MU and there are some small things we would like to have globally on all the sites without having to add them individually for each site. I would like to add a block of JavaScript and CSS that will execute on every site. What’s the best […]

How to customize admin posts based on the user who is logged in

We are building a site that will have 10-15 photographers posting content. There will be a common blog + each admin has their own portfolio to manage. “Portfolio galleries” and “portfolio pages” are two custom types and they are categorized using “Artist”, a custom taxonomy. We would like all admins: to be able to see […]

Why would switch_to_blog stop working?

I’m using the Multisite functionality of WordPress 3.0, and I have a network of sites built where I display one random post from one of the subsites on the main site’s front page. I accomplish this, in part, by using the switch_to_blog function from the old WPMU function list. Up until yesterday I could call […]