WP Smith

Creating WordPress & Genesis Websites Since 2010

  • Home
  • About
  • Services
  • Blog
  • Contact

Jan 04 2013

Add private/draft/future/pending pages to parent dropdown in page attributes and Quick Edit

<?php
add_filter( 'page_attributes_dropdown_pages_args', 'wps_dropdown_pages_args_add_parents' );
add_filter( 'quick_edit_dropdown_pages_args', 'wps_dropdown_pages_args_add_parents' );
/**
* Add private/draft/future/pending pages to parent dropdown.
*/
function wps_dropdown_pages_args_add_parents( $dropdown_args, $post = NULL ) {
$dropdown_args['post_status'] = array( 'publish', 'draft', 'pending', 'future', 'private', );
return $dropdown_args;
}
view raw wps_dropdown_pages_args_add_parents.php hosted with ❤ by GitHub

Written by Travis Smith · Categorized: WordPress

Sep 11 2012

How to Effectively Use the Blog Template with the Genesis Easter Egg, query_args, Pt 2?

In my previous post, How to Effectively Use the Blog Template with the Genesis Easter Egg, query_args, I discussed how to create single category pages and single custom post type pages with a caveat explained how to use shortcodes to get the desired content as well as the look and feel that you want.

However, if you wanted to get a bit more fancy like integrating multiple custom post types or multiple categories, that can be a bit more complicated. However, it isn't, if you know how to use query_args and query strings. With multiple categories, WordPress is looking for a comma separated (with no spaces!) list of categories. Your query_args would be: cat=3,7.

However, this will not work with post types! Instead you need to "build an array of post types via query string." Your query_args would be: post_type[]=post&post_type[]=wps_cpt1&post_type[]=wps_cpt2

So, if you wanted to combine the query where you show only posts from the post post type and your custom post type that share a specific category (WordPress built-in categories), then your query_args would be: cat=3&post_type[]=post&post_type[]=wps_cpt1.

So, when I said "your possibilities are almost endless" with using the Genesis Easter Egg, I meant that your possibilities are almost endless!

Written by Travis Smith · Categorized: WordPress

Sep 10 2012

[Infographic] Axleration WordPress Facts & Figures

Axleration WordPress Facts & Figures
Axleration WordPress Facts & Figures Click for Larger Image

Written by Travis Smith · Categorized: Infographic, WordPress

Sep 07 2012

How to Display a Different Menu Based on User Capabilities or Level

wp_nav_menu() has a filter, wp_nav_menu_args, right after it parses the function arguments. This essentially allows you to change the menu at any time. So, if you want to have a different menu for administrators, editors, authors, contributors, and subscribers, you can easily do this via the wp_nav_menu_args filter hook.

First, you will need to check the theme_location of the menu. If you utilize menu theme locations, as your theme should, then any time the location is empty, it is because of the Custom Menu widget. Personally, I wish WordPress would have placed that in the arguments; however, as it stands now, 3.4.2 and 3.5.0, it is what it is.

Use Justin Tadlock's Members plugin to create new roles and new capabilities to further expand this.

Written by Travis Smith · Categorized: WordPress

Sep 03 2012

[Infographic] davidrisley Blogging Platforms Comparison

davidrisley Blogging Platforms Comparison
davidrisley Blogging Platforms Comparison Click for Larger Image

Written by Travis Smith · Categorized: Infographic, WordPress

  • « Previous Page
  • 1
  • …
  • 5
  • 6
  • 7
  • 8
  • 9
  • …
  • 25
  • Next Page »
  • Twitter
  • Facebook
  • LinkedIn
  • Google+
  • RSS

Copyright © 2025 � WP Smith on Genesis on Genesis Framework � WordPress � Log in