WordPress Goodies
A few tidbits for WordPress I picked up this week working on Psychic Coupons and a couple other sites.
===============================================
This is an oldie but goody, helps a lot: http://codex.wordpress.org/Template_Hierarchy
and the PNG: http://codex.wordpress.org/images/1/18/Template_Hierarchy.png
===============================================
Here’s one from equalmark and banago at http://wordpress.org/support/topic/query-if-on-front-page-home-index :
If you’re on the front page, conditional statements:
<?php if(is_front_page() ) { ?> //do stuff <?php } ?>
— or --
<?php if(is_home() ) { //do stuff } else { //do stuff } ?>
Mvied notes: I’d just like to point out that the is_home() function is true if you’re on the main blog page, and the is_front_page() function can be the same page unless you have a static front page set, then it will only be true on that page.
============================================
Passing variables in the URL, by stvwlf from http://wordpress.org/support/topic/passing-variables-using-the-permalink-structure :
Step 1: Create and save PHP file in plugins directory: <?php /* Plugin Name: Parameter Plugin URI: http://webopius.com/ Description: A plugin to allow parameters to be passed in the URL and recognized by WordPress Author: Adam Boyse Version: 1.0 Author URI: http://www.webopius.com/ */ add_filter('query_vars', 'parameter_queryvars' ); function parameter_queryvars( $qvars ) { $qvars[] = ' myvar'; return $qvars; } ?>
Step 2: Pass var in URL href: if (isset($wp_query->query_vars['myvar'])) { print $wp_query->query_vars['myvar']; }
=============================================
Find and show related posts by tag: http://wordpress.org/support/topic/variables-through-get_posts-query_posts
=============================================
elseloop offers a simple way to implement a “Post template based on category”: http://wordpress.org/support/topic/post-template-based-on-category-or-tag
=============================================
I just want to pass my thanks to the many talented people who take the time to share their expertise on the WordPress community forum. They are adding value to the world, so, KUDOS to all you geniuses!
Posted under WebDev, WordPress
This post was written by Content Curator on April 10, 2012
Registry editor for Windows Mobile and PocketPC devices
Thanks to G. Inglemo we have a really neat way to hack the registry on out Windows Mobile based devices. The check out the developer’s page for full info.
Also, you can download it from NTI.
Posted under Microsoft, Mobile
This post was written by Content Curator on March 9, 2007
Disable screen saver / blanking, in text-mode terminal, Linux
Thanks to Vivek’s page
To stop the screen from blanking:
# setterm -powersave off -blank 0
Posted under Linux
This post was written by Content Curator on March 9, 2007
Easy Post Editing with WordPress
WordPress provides an easy method with which you can update your posts easily as you view them within your site. It is simply logging into your admin area, then viewing your site as a normal visitor. You can edit articles/posts/pages as you view them.
Here’s how:
Login to your site’s Admin area. This is usually something like “http:///www.yoursite.com/wordpress/wp-admin”.
Once logged in you’ll see a link at the top of the admin page that you’re looking at (just following your website name) that says View Site >> . Click It.
Now you’re viewing your website. Simply go view the page that you want to edit. You’ll notice a link below the article that reads Edit or “Edit this entry” or something to that effect.
Just click thet Edit link, and you’re in edit mode. Edit as usual.
Posted under WordPress
This post was written by Content Curator on October 11, 2006