laurakalbag + wordpress 354
A Guide to WordPress Custom Taxonomy
february 2012 by laurakalbag
<?php echo term_description( '', get_query_var( 'taxonomy' ) ); ?>
wordpress
taxonomy
customposttype
customtaxonomy
custom
posttype
archive
february 2012 by laurakalbag
WordPress › Support » Use Category Slug as link ID?
february 2012 by laurakalbag
<ul>
<?php
$args = array(
'taxonomy' => 'regions',
'orderby' => 'ID',
'hierarchical' => 1,
'echo' => 0,
'title_li' => ''
);
$categories = get_categories($args);
foreach($categories as $category) {
?>
<li class='<?php echo $category->slug; ?>'>
<a href='<?php echo get_category_link($category->cat_ID); ?>'><?php echo $category->name; ?></a>
</li>
<?php
}
?>
</ul>
wordpress
category
slug
as
link
id
theme
<?php
$args = array(
'taxonomy' => 'regions',
'orderby' => 'ID',
'hierarchical' => 1,
'echo' => 0,
'title_li' => ''
);
$categories = get_categories($args);
foreach($categories as $category) {
?>
<li class='<?php echo $category->slug; ?>'>
<a href='<?php echo get_category_link($category->cat_ID); ?>'><?php echo $category->name; ?></a>
</li>
<?php
}
?>
</ul>
february 2012 by laurakalbag
Add Post Class if Post has thumbnail | WordPress Snippets
february 2012 by laurakalbag
// add class if post has thumbnail
function has_thumb_class($classes) {
global $post;
if( has_post_thumbnail($post->ID) ) { $classes[] = 'has_thumb'; }
return $classes;
}
add_filter('post_class', 'has_thumb_class');
post
class
thumbnail
featured
image
wordpress
functions.php
function has_thumb_class($classes) {
global $post;
if( has_post_thumbnail($post->ID) ) { $classes[] = 'has_thumb'; }
return $classes;
}
add_filter('post_class', 'has_thumb_class');
february 2012 by laurakalbag
How to Add Custom Post Type Icons | WordPress Theming
july 2011 by laurakalbag
// Styling for the custom post type icon
add_action( 'admin_head', 'wpt_portfolio_icons' );
function wpt_portfolio_icons() {
?>
<style type="text/css" media="screen">
#menu-posts-portfolio .wp-menu-image {
background: url(<?php bloginfo('template_url') ?>/images/portfolio-icon.png) no-repeat 6px 6px !important;
}
#menu-posts-portfolio:hover .wp-menu-image, #menu-posts-portfolio.wp-has-current-submenu .wp-menu-image {
background-position:6px -16px !important;
}
#icon-edit.icon32-posts-portfolio {background: url(<?php bloginfo('template_url') ?>/images/portfolio-32x32.png) no-repeat;}
</style>
<?php }
customposttype
wordpress
icons
menuicons
add_action( 'admin_head', 'wpt_portfolio_icons' );
function wpt_portfolio_icons() {
?>
<style type="text/css" media="screen">
#menu-posts-portfolio .wp-menu-image {
background: url(<?php bloginfo('template_url') ?>/images/portfolio-icon.png) no-repeat 6px 6px !important;
}
#menu-posts-portfolio:hover .wp-menu-image, #menu-posts-portfolio.wp-has-current-submenu .wp-menu-image {
background-position:6px -16px !important;
}
#icon-edit.icon32-posts-portfolio {background: url(<?php bloginfo('template_url') ?>/images/portfolio-32x32.png) no-repeat;}
</style>
<?php }
july 2011 by laurakalbag
Shortcode in a Template
may 2011 by laurakalbag
<?php echo do_shortcode("[shortcode]"); ?>
shortcode
wordpress
template
theme
may 2011 by laurakalbag
Display WordPress content outside your blog // Corvid Works
march 2011 by laurakalbag
<?php
// Include WordPress
define('WP_USE_THEMES', false);
require('./wordpress/wp-load.php');
query_posts('showposts=1');
?>
display
wordpress
content
outside
templates
// Include WordPress
define('WP_USE_THEMES', false);
require('./wordpress/wp-load.php');
query_posts('showposts=1');
?>
march 2011 by laurakalbag
WordPress › Custom Post Type List Widget « WordPress Plugins
march 2011 by laurakalbag
Custom Post Type List Widget
custom
post
type
list
widget
wordpress
plugin
march 2011 by laurakalbag
related tags
$content_width ⊕ 2.7 ⊕ 3.0 ⊕ accessibility ⊕ actions ⊕ add ⊕ addthis ⊕ admin ⊕ adminbar ⊕ advanced ⊕ affiliate ⊕ aggregation ⊕ ajax ⊕ altlinktext ⊕ amazon ⊕ analytics ⊕ animation ⊕ appstore ⊕ archive ⊕ archives ⊕ artdirection ⊕ as ⊕ attachment ⊕ author ⊕ avatar ⊕ background ⊕ backup ⊕ band ⊕ bar ⊕ bbpress ⊕ beginner ⊕ best ⊕ better ⊕ betterrss ⊕ blank ⊕ blogging ⊕ body ⊕ bodyclass ⊕ bodyid ⊕ bookmark ⊕ bookmarking ⊕ bottom ⊕ box ⊕ boxes ⊕ breadcrumb ⊕ buddypress ⊕ carousel ⊕ carrington ⊕ categories ⊕ category ⊕ change ⊕ changes ⊕ changing ⊕ chat ⊕ cheat ⊕ cheatsheet ⊕ checklist ⊕ child ⊕ childthemes ⊕ class ⊕ classes ⊕ clean ⊕ client ⊕ clients ⊕ cms ⊕ code ⊕ columns ⊕ comment ⊕ comments ⊕ connect ⊕ connection ⊕ contactform ⊕ content ⊕ contentstrategy ⊕ core ⊕ count ⊕ create ⊕ css ⊕ custom ⊕ custom-post-type ⊕ custombackground ⊕ customfield ⊕ customfields ⊕ customheader ⊕ customisation ⊕ custommenu ⊕ custompost ⊕ customposttype ⊕ customposttypes ⊕ customtaxonomy ⊕ dashboard ⊕ database ⊕ date ⊕ db ⊕ debug ⊕ default ⊕ delete ⊕ design ⊕ designs ⊕ dev ⊕ develop ⊕ development ⊕ developmentsite ⊕ disable ⊕ display ⊕ documentation ⊕ domain ⊕ dots ⊕ download ⊕ downloadmonitor ⊕ dribbble ⊕ dummy ⊕ dynamic ⊕ E-mail ⊕ ecommerce ⊕ editing ⊕ editor ⊕ editor-style.css ⊕ editor.css ⊕ email ⊕ empty ⊕ encrypt ⊕ entrymeta ⊕ error ⊕ excerpt ⊕ exchange ⊕ expiration ⊕ extra ⊕ facebook ⊕ feature ⊕ featured ⊕ featurificpro ⊕ feed ⊕ field ⊕ fields ⊕ file ⊕ fileheaders ⊕ files ⊕ filler ⊕ filters ⊕ findrecords ⊕ fix ⊕ flutter ⊕ folder ⊕ font ⊕ fonts ⊕ form ⊕ framework ⊕ free ⊕ function ⊕ functions ⊕ functions.php ⊕ gallery ⊕ gallerywidgetpro ⊕ generator ⊕ gettheimage ⊕ gigpress ⊕ google ⊕ gravatar ⊕ gravity ⊕ greet ⊕ guide ⊕ hack ⊕ hacks ⊕ header ⊕ height ⊕ hide ⊕ hidenewpage ⊕ highlighter ⊕ highquality ⊕ hooks ⊕ htaccess ⊕ HTML ⊕ http ⊕ hybrid ⊕ i18n ⊕ icon ⊕ icons ⊕ id ⊕ image ⊕ imagereplacement ⊕ images ⊕ imageupload ⊕ include ⊕ input ⊕ install ⊕ installer ⊕ integration ⊕ iphone ⊕ jquery ⊕ layout ⊕ length ⊕ lesterchan ⊕ limit ⊕ link ⊕ links ⊕ linkshortener ⊕ list ⊕ live ⊕ local ⊕ login ⊕ loginpage ⊕ logo ⊕ loop ⊕ lorem ⊕ mailinglist ⊕ mailsender ⊕ maintenance ⊕ manager ⊕ max ⊕ maximum ⊕ membersonly ⊕ menu ⊕ menuicons ⊕ menus ⊕ message ⊕ meta ⊕ metabox ⊕ metaboxes ⊕ migrate ⊕ moderator ⊕ move ⊕ moving ⊕ ms ⊕ mu ⊕ mullet ⊕ multiplatform ⊕ multiple ⊕ multiplesizes ⊕ multisite ⊕ mustuse ⊕ naked ⊕ navigation ⊕ network ⊕ News ⊕ newsletter ⊕ no ⊕ notification ⊕ noupe ⊕ openid ⊕ opensource ⊕ optimisation ⊕ options ⊕ organisational ⊕ outside ⊕ overflow ⊕ page ⊕ paged ⊕ pages ⊕ pagination ⊕ password ⊕ permalinks ⊕ php ⊕ phpbb ⊕ piclens ⊕ pl ⊕ placeholder ⊕ plugin ⊕ plugins ⊕ podcast ⊕ pods ⊕ polldaddy ⊕ polls ⊕ portfolio ⊕ post ⊕ posthumbnail ⊕ postimage ⊕ posts ⊕ posts2posts ⊕ posttype ⊕ posttypes ⊕ practice ⊕ prevent ⊕ preview ⊕ private ⊕ profile ⊕ project ⊕ query ⊕ query_post ⊕ RAMP ⊕ random ⊕ recent ⊕ redirect ⊕ redirection ⊕ reference ⊕ register ⊕ related ⊕ relatedposts ⊕ relatedpostsbycategory ⊕ remove ⊕ reset ⊕ resize ⊕ resizing ⊕ resources ⊕ role ⊕ rss ⊕ scheme ⊕ scoper ⊕ search ⊕ searches ⊕ security ⊕ seo ⊕ settings ⊕ shop ⊕ shortcode ⊕ shoutbox ⊕ sidebar ⊕ sidebars ⊕ sidebars_ ⊕ sidebar_ ⊕ sifr ⊕ signin ⊕ simplify ⊕ sizes ⊕ slug ⊕ slugs ⊕ social ⊕ speed ⊕ sphider ⊕ sql ⊕ stack ⊕ stackexchange ⊕ stackoverflow ⊕ structure ⊕ style ⊕ subscribe ⊕ subscribe2 ⊕ support ⊕ surveys ⊕ sync ⊕ syntax ⊕ tag ⊕ tags ⊕ taxonomies ⊕ taxonomy ⊕ template ⊕ templates ⊕ templatetags ⊕ test ⊕ testing ⊕ theme ⊕ themeframework ⊕ themes ⊕ themetestdrive ⊕ the_post_image ⊕ thumbnail ⊕ ticker ⊕ time ⊕ tinymce ⊕ tinymceadvanced ⊕ tips ⊕ title ⊕ tool ⊕ tools ⊕ tracking ⊕ translation ⊕ translator ⊕ tutorial ⊕ tweet ⊕ twitpic ⊕ twitter ⊕ type ⊕ types ⊕ ui ⊕ universities ⊕ unregister ⊕ updates ⊕ url ⊕ urls ⊕ usability ⊕ user ⊕ validation ⊕ video ⊕ visual ⊕ visualeditor ⊕ wall ⊕ webresources ⊕ widget ⊕ widgets ⊕ width ⊕ wiki ⊕ word ⊕ wordpress ⊖ wordpress2.7 ⊕ wordpress3.0 ⊕ wordpress3.1 ⊕ wordpressresources ⊕ wordpress_ ⊕ wp ⊕ wp-admin ⊕ wpblocks ⊕ wpdbmanager ⊕ wpmu ⊕ write ⊕ writepanels ⊕ yfrog ⊕ youtube ⊕Copy this bookmark: