[WPSNIPP]Include external file shortcode








snippet :  PHPcopy
function show_file_func( $atts ) {
  extract( shortcode_atts( array(
    'file' => ''
  ), $atts ) );
  if ($file!='')
    return @file_get_contents($file);
}
add_shortcode( 'show_file', 'show_file_func' );
source →
snippet :  SHORTCODEcopy
[show_file file="http://www.mysite.com/somefile.html"]
source →




Include external file shortcode?u=rss">Visit wpsnipp.com for details on how to setup this WordPress snippet.

Share this post.


Include external file shortcode">StumbleUpon | Include external file shortcode @wpsnipp">Tweet It | Include external file shortcode">DesignBump-It |
©
wpsnipp.com All Rights reserved.

source: wpsnipp.com

[WPSNIPP]Exclude pages from admin pages list by ID








snippet :  PHPcopy
add_action( 'pre_get_posts' ,'exclude_this_page' );
function exclude_this_page( $query ) {
	if( !is_admin() )
		return $query;
	global $pagenow;
	if( 'edit.php' == $pagenow && ( get_query_var('post_type') && 'page' == get_query_var('post_type') ) )
		$query->set( 'post__not_in', array(10,2,14) ); // array page ids
	return $query;
}
source →




Exclude pages from admin pages list by ID?u=rss">Visit wpsnipp.com for details on how to setup this WordPress snippet.

Share this post.


Exclude pages from admin pages list by ID">StumbleUpon | Exclude pages from admin pages list by ID @wpsnipp">Tweet It | Exclude pages from admin pages list by ID">DesignBump-It |
©
wpsnipp.com All Rights reserved.

source: wpsnipp.com

[BuyNowShop]NoNa 1.5

To round out the recent theme updates, I have uploaded the latest version, 1.5, of NoNa. These updates, like the other theme updates, were mostly directed at addressing functions that are being deprecated in WordPress 3.4. The balance of the updates were mostly aesthetic in nature.

To see the changelog click here.To hide the changelog click here.
== Version 1.5 ==
Changelog: April 24, 2012
= Code =
* Added $args to `nona_login` function – adopted from BNS-Login plugin
* Added conditional check to only display website (and email) if exists, as well as only display biography if it exists
* Addressed deprecated function call to `add_custom_background`
* Addressed deprecated function calls to `get_theme_data`
* Make post edit link preceding character consistent across all theme templates

= CSS =
* Corrected various class names … changed from ‘bns-’ to ‘nona-’
* Form aesthetics improved

= Internet Browsers Reviewed =
* Apple Safari v5.1.5
* Firefox v11.0
* Google Chrome v18.0
* Internet Explorer v9.0
* Opera v11.62

/** ————————————————————————- */

© 2012, Edward Caissie. All rights reserved.

Related posts:

  1. Shades 1.8
  2. Ground Floor 1.9
  3. NoNa 1.4

[BuyNowShop]Shades 1.8

Another recently updated theme is Shades, to version 1.8. Most of the modifications had to do with the upcoming new WordPress version 3.4 but a couple of added items were also ones I had been looking for a solution to as well.

To see the changelog click here.To hide the changelog click here.
Changelog as of April 20, 2012
== Version 1.8 ==
= CODE =
* Added doc blocks and improved overall code quality and structure
* Added link to modified author’s post archive
* Added conditionals to only show website URL (with email) if the address is found in the user profile; and only show biography if it exists on ‘author.php’ output
* Addressed call to deprecated function `get_userdatabylogin`
* Addressed calls to deprecated function `get_theme_data`
* Addressed call to deprecated function `add_custom_background`
* Renamed `bns_dynamic_copyright` to `shades_dynamic_copyright`
* Renamed `bns_theme_version` to `shades_theme_version`
* Replaced navigation with call to `get_template_part( ‘shades-navigation’ )`
* Replaced output if no posts are returned by the_Loop with a call to get_template_part( ‘shades-no-posts’ )

= CSS =
* Added “commenter classes” as defined in ‘author.php’
* Added ‘no-title’ class to post classes if `get_the_title` is empty
* Added ‘widget_tag_cloud’ element
* Adjusted ‘sticky’ post related styles
* Adjusted `gallery` `max-width` for better aesthetics

= Miscellaneous =
* Adoption of a ‘markdown’ / ‘phpdoc’ style in the changelog (this file)
* Added Review Ticket section to ‘readme.txt’

= Internet Browsers Reviewed =
* Apple Safari v5.1.5
* Firefox v11.0
* Google Chrome v18.0
* Internet Explorer v9.0
* Opera v11.62

/** ————————————————————————- */

© 2012, Edward Caissie. All rights reserved.

Related posts:

  1. NoNa 1.5
  2. Ground Floor 1.9
  3. Shades 1.7

[BuyNowShop]Ground Floor 1.9

As WordPress 3.4 approaches a few items have changed that required attention in the Ground Floor theme, namely the deprecation of the get_theme_data and add_custom_background functions.

To see the changelog click here.To hide the changelog click here.
== Version 1.9 ==
Changelog: April 19, 2012
= Code =
* Added conditionals to display website (with email) and biography only if information has been entered into the user fields
* Addressed deprecated function call to `add_custom_background`
* Addressed deprecated function calls to `get_theme_data`
* Addressed deprecated function call to `get_userdatabyloogin`
* Changed `bns_modified_post` to `gf_modified_post`
* Changed `bns_theme_version` to `gf_theme_version`
* Changed `bns_dynamic_copyright` to `gf_dynamic_copyright`

= CSS =
* Adjust CSS on sticky posts to provide better contrast
* Added CSS to better display more uniform images in galleries greater than four columns

= Miscellaneous =
* Improved code quality via better and more consistent structure and format
* Dropped direct support for older versions of Internet Explorer

= Internet Browsers Reviewed =
* Chrome v18.0
* Firefox v11.0
* Internet Explorer v9.0
* Opera v11.61
* Safari v5.1.5

/** ————————————————————————- */

© 2012, Edward Caissie. All rights reserved.

Related posts:

  1. NoNa 1.5
  2. Shades 1.8
  3. Ground Floor 1.4

[BuyNowShop]Multi 2.0.2

Following closely on the release of its Parent-Theme, Desk Mess Mirrored, the Child-Theme Multi has been updated and released as of April 13, 2012 … and it is available from WordPress Extend Themes repository, too.

This update was also part of the effort to help provide test themes for the upcoming release of WordPress 3.4.

To see the changelog click here.To hide the changelog click here.
==== Changelog.txt ====
= Version 2.0.2 =
* Added project documentation doc-block to ‘header.php’
* Modified HTML title tag to use `dmm_wp_title`
* Removed the ‘author’ template as it is functionally identical to the Desk Mess Mirrored ‘author’ template
* Removed the ‘comment’ template as it is functionally identical to the Desk Mess Mirrored ‘comment’ template
* Matched to Desk Mess Mirrored 2.0.2

© 2012, Edward Caissie. All rights reserved.

Related posts:

  1. Multi 1.7.2
  2. Desk Mess Mirrored 2.0
  3. Multi 1.8.3 Live

[BuyNowShop]Desk Mess Mirrored 2.0.2

Just a quick note … Desk Mess Mirrored was updated to version 2.0.2 March 1, 2012. The update itself was more to provide a sample Parent-Theme and a theme with multiple screenshots for testing purposes with the next version of WordPress 3.4

To see the changelog click here.To hide the changelog click here.
== Version 2.0.2 ==
Changelog: March 1, 2012
= Code =
* Un-wrapped the `register_nav_menu` call

= Miscellaneous =
* Added additional screenshots
* Updated ‘readme.txt’ with a Screenshot section and relevant descriptions

/** ————————————————————————- */

© 2012, Edward Caissie. All rights reserved.

Related posts:

  1. Desk Mess Mirrored 2.0.1
  2. Desk Mess Mirrored 1.8.3 is Live
  3. Desk Mess Mirrored 2.0

[Desperately Seeking WordPress]Drumroll please! Our New Control Panel!!

In a one-hour tutorial, the most common feedback I get is, “I’m overwhelmed… let me think about this.”  It is a LOT to soak in.

And I’ve spent weeks if not months, thinking about how to sort through the tutorials available and make them digestible.  Instead of trying to teach all the stuff you might need to know, how about I just do it for you?

And you focus on what you do best: your business.

In order for you to fully appreciate the huge difference, here’s the before pic:

Before

TA DA:  THIS is the new control panel:

After

Here is a quick walk-through of the new steamlined features:

Features include:

  • Easy access to the Control Panel – you don’t have to remember the login link!
  • Only 2 panels to enter your content into with clear names: Blogs or Pages
  • Site stats on Control Panel – no wading through Google Analytics!
  • All Maintenance and Upgrades taken care of
  • Regular Security Sweeps
  • Support by a Friendly Geek to change any settings or features
  • Direct Access to Tutorials
  • Direct Access to your Email
  • Direct Access to Support at Your Friendly Geeks Account

What do you think?  Do you love it?

[Desperately Seeking WordPress]How to Create a Recipe or Photo Index in Genesis

These templates/snippets will work only if you have the Genesis Framework installed and a child theme active.  This will provide a graphic / image based index of your photos or recipes categories.

Image Index for Recipes or Photos

Image Index from FramedCooks.com

Before you start, you’ll need this:

  • FTP access
  • Text / Code editor
  • All posts for this index in one big category, for example, “Recipes” with all the sub-categories below that.  Each post/recipe should be placed in one of the sub-categories.
  • The ID of the main category
WARNING: adding this code to your site can break it entirely – cause it not to show up.  I recommend making changes to your files via FTP and only after you’ve taken a backup!!

1. Create the Main Image Index Page

Create a new Page (not post) and simply create a gallery of your favorite images – one representing each sub-category.  In the above image, the sub-categories were Appetizers, Breakfast & Brunch, Lunch and so on.  Then style appropriately.  Link each of these images to your sub-categories.

Now we’ll create the templates for each sub-category to automatically display all the latest yummy-ness or photos.

2. Test for child categories using a custom function

Add this to your child theme’s functions.php:

//by ValenDesigns.com

// If is category or subcategory of $cat_id
if (!function_exists('is_category_or_sub')) {
	function is_category_or_sub($cat_id = 0) {
	    foreach (get_the_category() as $cat) {
	    	if ($cat_id == $cat->cat_ID || cat_is_ancestor_of($cat_id, $cat)) return true;
	    }
	    return false;
	}
} 

3. Add an archive.php template to Genesis child theme

Add this file in its entirety to your child theme folder and name it archive.php.  If you already have an archive template, this will NOT work – you’ll need to add these functions carefully to the existing file so you don’t disable current functions.



















 cat_ID;
 	$child_cats = get_categories('child_of='.$cat);
 		if ($child_cats) { $args = array(
    'title_li' => '',
    'depth' => 1,
    'echo' => 1,
    'child_of' => $cat
    ); ?>
  	
'.get_the_post_thumbnail($post->ID, 'thumbnail').''; } } /** * Grid Loop Divider * @author Bill Erickson * @link http://www.billerickson.net/genesis-grid-loop-content/ * */ function dswp_grid_divider() { global $loop_counter, $paged; if ((($loop_counter + 1) % 3 == 0) && !($paged == 0 && $loop_counter < 2) ) echo '
'; } //grid function function dswp_grid_helper() { // Ensure the arguments for the normal query for the page are carried forwards global $query_string, $paged; // If you're using a Page to query the posts (e.g. with the Blog template), comment out the next line. wp_parse_str( $query_string, $query_args ); $grid_args = array( 'features' => 0, 'feature_image_size' => 0, 'feature_image_class' => 'alignleft post-image', 'feature_content_limit' => 0, 'grid_image_size' => '0', 'grid_image_class' => 'alignleft post-image', 'grid_content_limit' => -1, 'more' => __( '', 'genesis' ), //change this if you would like more or less photos per page 'posts_per_page' => 24, ); // Make sure the first page has a balanced grid if ( 0 == $paged ) // If first page, add number of features to grid posts, so balance is maintained $grid_args['posts_per_page'] += $grid_args['features']; else // Keep the offset maintained from our page 1 adjustment $grid_args['offset'] = ( $paged - 1 ) * $grid_args['posts_per_page'] + $grid_args['features']; // Merge the standard query for this page, and our preferred loop arguments genesis_grid_loop( array_merge( (array) $query_args, $grid_args ) ); } genesis();

You need to add your own category ID where it is marked in the code.

This code does the following:

  • Displays the category title (ie: Recipes)
  • Displays a list of sub-categories (ie: Appies, Beverages, Desserts, etc)
  • Displays a grid of thumbnails that are “thumbnail” sized
  • Displays 24 thumbnails with pagination

4. Style your Image Index with CSS

You will need to come up with your own styles to make it pretty!

Need a hand?  Let me know in the comments or hire me to help!  :)

 

[WordPress Canada]Save Big With Tokokoo

Looking for a killer deal on WordPress e-commerce themes? Tokokoo, makers of fine premium WordPress e-commerce themes has you covered. They are currently offering two amazing deals with blowout prices.

5 WPEC Themes for $75

Normally these themes go for $75ea but for a limited time you can get all 5 of them for the grand total of $75 - that's a savings of 80%. The themes included in this deal are:

  • Parquet - ideal for a furniture store
  • Paloogada - perfect for apparel/fashion
  • Dangdoot - suited for a music store
  • Bangkoo - another theme geared toward a furniture store
  • Tokobuku - great for a book store

Of course the suggested uses are just that - suggestions. These themes can be used for any type of online store. Below is a screenshot of the Parquet WPEC Theme.

Parquet WPEC Theme

click to enlarge

5 WooCommerce Themes for $75

Just like the WPEC themes, these normally retail for $75ea but again you can grab 5 of them in the bundle for just $75 total. Once again a savings of 80%! The themes included in this deal are:

  • TokoBajoo - for apparel/fashion
  • Roxx - apparel/fashion
  • DapurKue - for your culinary store
  • TeeShirt - again apparel/fashion
  • Arpegio - a good fit for your music store

As with the first bundle you can use these themes for any type of online store. Below is a screenshot of the TokoBajoo WooCommerce Theme.

TokoBajoo WooCommerce Theme

click to enlarge

If you've been considering opening an online store using WordPress now is the perfect time to get started with these great deals. Get all of the details here.

You can follow Tokokoo on Twitter @tokokoo.

Planet WordPress Canada theme by WPDesigner, syndication by Pipes, FeedWordPress, and Feedburner, powered by ?