Logged in and logged out content tutorial : BuddyDress

Display different contents for logged in/out users Logged in and logged out content tutorial : BuddyDress.

WordPress › Remove Title Attributes « WordPress Plugins

WordPress › Remove Title Attributes « WordPress Plugins.

Comments, Feed and wp_head

How to remove comments feed from wp_head go to /wp-includes/default-filters.php remove: add_action( ‘wp_head’, ‘feed_links_extra’, 3 );   How to exclude certain pages from RSS feed: (used rss-includes-pages ) <?php /** * Plugin Name: exclude page from rss feed. * * @package WordPress */ function myFilter($query) { if ($query->is_feed) { $query->set(‘cat’,’-327′); } return $query; }   add_filter(‘pre_get_posts’,’myFilter’); … Continue reading

jQuery Mobile Docs – Anatomy of a Page

Testing my mobile site a bunch of times, it worked at iPad platform, but  the interface is extremely small on iPhone platform. At last, I figured out I needed this line of code: <meta name=”viewport” content=”width=device-width, initial-scale=1″> via jQuery Mobile Docs – Anatomy of a Page.

how to add category to pages

at last, it is resolved. add_action(‘init’,’attach_category_to_page’); function attach_category_to_page() { register_taxonomy_for_object_type(‘category’,’page’); } via themes – Categories for Pages Not Saving in Admin with Custom Categories Metabox? – WordPress – Stack Exchange.

Rapid Prototyping For Any Device With Foundation – Smashing Coding

Rapid Prototyping For Any Device With Foundation – Smashing Coding. So cool. I found wordpress theme for foundation and installed it. It works. I just feel there are so many ways to build a responsive mobile site.  The thing is getting easier. Great! related resources: http://www.zurb.com/article/820/two-weeks-two-releases-foundation-update http://foundation.zurb.com/docs/index.php http://www.zurb.com/soapbox I really like this website. it is much cooler than … Continue reading

Code Note: read more link

function new_excerpt_more($more) { global $post; return ‘ <a href=”‘. get_permalink($post->ID) . ‘”>[…]</a>’; } add_filter(‘excerpt_more’, ‘new_excerpt_more’);

Code Note: excerpt length

function new_excerpt_length($length) { if(is_category(‘news’)){ return 14; } else { return 55; } } add_filter(‘excerpt_length’, ‘new_excerpt_length’);   function new_excerpt_more($more) { return ‘ […]’; } add_filter(‘excerpt_more’, ‘new_excerpt_more’);

Using get_header to design multiple templates in the same domain

<?php get_header( $name ); ?> via Function Reference/get header « WordPress Codex. The file names for the home and 404 headers should be header-home.php and header-404.php respectively.

Using Multilingual

i am using Multilingual plugin for wordpress now. this is the solution for hiding current language: copy function icl_post_languages(){ $languages = icl_get_languages(‘skip_missing=1’); if(1 < count($languages)){ echo __(‘This post is also available in: ‘); foreach($languages as $l){ if(!$l[‘active’]) $langs[] = ‘<a href=”‘.$l[‘url’].'”>’.$l[‘translated_name’].'</a>’; } echo join(‘, ‘, $langs); } } to function.php and copy below to header.php (or single.php) … Continue reading

Design a site like this with WordPress.com
Get started