Articles of columns

WordPress Theory Lesson – Image Columns within posts with alignment?

Trying to get my head round a request from a client, and thought I’d try to hivemind the solution a little bit. The client requires a two column post layout, with images down the right and text on the left. Now, that bit it relatively straight forward (he says, having not tried it yet), but […]

Calculations in functions.php

I’ve created an invoice theme for myself and I’m trying to get the invoice total in a custom column. I’ve tried adapting the code I’m using within the template page to display this in the functions.php file but it’s not working. I’m getting an operand error where my multiplication operand is and I don’t know […]

Gallery Settings Change available Columns

Is there a filter hook which changes the number of available columns in gallery settings screen. I’m talking about the : <label class=”setting”> <span><?php _e(‘Columns’); ?></span> <select class=”columns” name=”columns” data-setting=”columns”> <?php for ( $i = 1; $i <= 9; $i++ ) : ?> <option value=”<?php echo esc_attr( $i ); ?>” <?php selected( $i, 3 ); […]

Custom post admin filtering by post meta (the date)

I’ve created a custom post type for events that uses a custom field to retrieve the date for the event. It works ok and I’m able to filter the displayed results using meta_compare to compare the date value to the current date. So far so good. I can also filter the admin end to display […]

Add Post Url to Manage Edit Screen

I’m trying to add a column to the manage screen that displays the Title and url of the post. I got the Title to work but it’s not pulling the url. Basically I just want to show the url that’s not been cut of like what sometimes happens in the edit screen. Here’s my code: […]

Custom admin columns for ALL custom post types

I have the following function which is working perfectly for my ‘video’ custom post type to display customized columns in the dashboard. I have decided the way my plugin will work is to have custom post types created dynamically so I no longer know the exact name of the custom post type and I would […]

order of date column in custom post type

I have a custom post type and trying to set custom columns, the date column is there by default, and it appears right after the title. Do I have to unset the date first and then re-apply it, or is there a more elegant way of achieving this: function custom_columns($columns) { unset( $columns[‘date’] ); $columns […]

How to change WordPress theme to one column?

Currently I’m using The Morning After Theme (http://theme.wordpress.com/themes/themorningafter/) It lists one-column as a feature, so how do I change it to one-column? The default is three columns.

Adding menu_order to CPT admin page

I have a custom post type (cpt_roundtable), and am trying to add a column to the admin page showing the menu_order for each entry. This is in my functions.php file. function set_roundtable_columns($columns) { return array( ‘cb’ => ‘<input type=”checkbox” />’, ‘title’ => __(‘Title’), ‘taxonomy-sessions’ => __(‘Session’), ‘menu_order’ => __(‘Order’), ‘date’ => __(‘Date’), ); } add_filter(‘manage_cpt_roundtable_posts_columns’ […]

First post full width, rest in two columns

Here is my loop <?php if ( have_posts() ) : ?> <?php /* Start the Loop */ ?> <?php $i = 0; while ( have_posts() ) : the_post(); ?> <?php if ($i++ == 0) : ?> <div class=”entry-content-main”> <?php get_template_part( ‘content’, get_post_format() ); ?> </div> <?php else: ?> <div class=”entry-content-rest”> <?php get_template_part( ‘content’, get_post_format() ); […]