This is a list of the SublimeText 2 addons I use for my development environment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Twitter Bootstrap SDK Load --> | |
<script src="http://code.jquery.com/jquery.min.js"></script> | |
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet" type="text/css" /> | |
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" /> | |
<script src="http://twitter.github.com/bootstrap/assets/js/bootstrap.js"></script> | |
<!-- End of Twitter Bootstrap SDK Load --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function XX_scripts_with_jquery() { | |
wp_register_script( 'XX-script',get_template_directory_uri().'/bootstrap/js/bootstrap.js',array('jquery')); | |
wp_enqueue_script( 'XX-script' ); | |
} | |
add_action('wp_enqueue_scripts','XX_scripts_with_jquery'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
<?php endwhile; else: ?> | |
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p> | |
<?php endif; ?> | |
<?php get_footer(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class Name: twitter_bootstrap_nav_walker | |
* GitHub URI: https://github.com/twittem/wp-bootstrap-navwalker | |
* Description: A custom Wordpress nav walker to implement the Twitter Bootstrap 2 (https://github.com/twitter/bootstrap/) dropdown navigation using the Wordpress built in menu manager. | |
* Version: 1.2.2 | |
* Author: Edward McIntyre - @twittem | |
* Licence: WTFPL 2.0 (http://sam.zoy.org/wtfpl/COPYING) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(is_category()) { | |
$category = get_query_var('cat'); | |
$current_cat = get_category($cat); | |
echo 'The slug is ' . $ current_cat->slug; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query_posts('category_name=category-slug'); | |
if (have_posts()) : | |
while (have_posts()) : the_post(); | |
$posttags = get_the_tags(); | |
if ($posttags) { | |
foreach($posttags as $tag) { | |
$all_tags_arr[] = $tag->name; //USING JUST $tag MAKING $all_tags_arr A MULTI-DIMENSIONAL ARRAY, WHICH DOES WORK WITH array_unique | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//FUNCTION FILE | |
function get_category_tags($args) { | |
global $wpdb; | |
$tags = $wpdb->get_results | |
(" | |
SELECT DISTINCT terms2.term_id as tag_id, terms2.name as tag_name, null as tag_link | |
FROM | |
wp_posts as p1 | |
LEFT JOIN wp_term_relationships as r1 ON p1.ID = r1.object_ID | |
LEFT JOIN wp_term_taxonomy as t1 ON r1.term_taxonomy_id = t1.term_taxonomy_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#box { | |
position: relative; | |
border: 1px solid #E0E0E0; | |
} | |
#box:before, #box:after { | |
display: block; | |
content: ""; | |
clear: both; | |
} |
OlderNewer