\ No newline at end of file
diff --git a/src/wp-content/themes/fiatlux/functions/portfolio.php b/src/wp-content/themes/fiatlux/functions/portfolio.php
index 25d69a3..189177e 100644
--- a/src/wp-content/themes/fiatlux/functions/portfolio.php
+++ b/src/wp-content/themes/fiatlux/functions/portfolio.php
@@ -88,6 +88,28 @@ function register_cpt_ml_portfolio() {
}
+add_filter('manage_ml_portfolio_posts_columns', 'skill_column' ); //Filter out Post Columns with 2 custom columns
+add_action('manage_ml_portfolio_posts_custom_column', 'skill_custom_column', 10, 2);
+
+function skill_column($defaults) {
+ $defaults['ml_skill'] = __('Skill'); //Language and Films is name of column
+ return $defaults;
+}
+
+function skill_custom_column($column_name, $post_id) {
+ $taxonomy = $column_name;
+ $post_type = get_post_type($post_id);
+ $terms = get_the_terms($post_id, $taxonomy);
+
+ if ( !empty($terms) ) {
+ foreach ( $terms as $term )
+ $post_terms[] = "
" . esc_html(sanitize_term_field('name', $term->name, $term->term_id, $taxonomy, 'edit')) . "";
+ echo join( ', ', $post_terms );
+ }
+ else echo '
No terms.';
+}
+
+
//requires the meta-box script for custom meta fields
require_once ('meta-box.php');
diff --git a/src/wp-content/themes/fiatlux/includes/loop-portfolio-2cols.bak.php b/src/wp-content/themes/fiatlux/includes/loop-portfolio-2cols.bak.php
new file mode 100644
index 0000000..bd96eca
--- /dev/null
+++ b/src/wp-content/themes/fiatlux/includes/loop-portfolio-2cols.bak.php
@@ -0,0 +1,384 @@
+
+
+
+
+ID, 'id_skill', true);
+
+?>
+
+
+
+
+
+
+
+ $skill_id, 'hide_empty' => 0));
+ $count = count($terms);
+ if ( $count > 0 ){
+ foreach ( $terms as $term ) {
+ echo "- " . $term->name . "
";
+ }
+ }
+ ?>
+
+
+
+
+
+ 'ml_portfolio',
+ 'posts_per_page' => -1,
+ 'orderby' => 'title',
+ 'order' => 'ASC',
+ 'tax_query' => array('taxonomy' => 'ml_skill', 'field' => 'id', 'terms' => $skill_id)
+);
+query_posts( $args );
+?>
+
+
+
+
+
+ID, 'ml_skill' ); // get an array of all the terms as objects.
+
+$terms_slugs = array();
+$portfolio_item = '';
+
+foreach( $terms as $term ) {
+ $portfolio_item = $portfolio_item . ' ' . 'skill_' . sanitize_title($term->name) . ' '; // save each sanitized name inside the array and add a 'skill_' prefix to prevent conclicts
+}
+
+$portfolio_item = $portfolio_item . 'portfolio-item';
+?>
+
+
>
+
+ ID), 'full');
+ $featured_normal = $featured_normal[0];
+
+ //get the featured image description
+ $featured_id = get_post_meta($post->ID, '_thumbnail_id', true);
+ $featured_attachment = get_post($featured_id);
+ $featured_description = $featured_attachment->post_excerpt == "" ? $featured_attachment->post_content : $featured_attachment->post_excerpt;
+ //if don't have any description, make it blank
+ if (!($featured_description)) {
+ $featured_description = ' ';
+ }
+
+
+ //Lightbox - YouTube.
+ if(get_post_meta($post->ID, 'ml_fc_featured_content', true) == 'lightbox_youtube') {
+ //Video URL
+ $featured_content = get_post_meta($post->ID, 'ml_fc_lightbox_youtube', true);
+ ?>
+
+
+
+
+
+ ID, 'ml_fc_featured_content', true) == 'lightbox_vimeo') {
+ //Video URL
+ $featured_content = get_post_meta($post->ID, 'ml_fc_lightbox_vimeo', true);
+ //Content Poster
+ $content_poster = get_post_meta($post->ID, 'ml_fc_embedded_video_poster', true);
+ $content_poster = get_template_directory_uri() . '/includes/timthumb.php?src=' . $content_poster . '&w=416&h=234&zc=1&q=100';
+ ?>
+
+
+
+
+
+ ID, 'ml_fc_featured_content', true) == 'lightbox_mov') {
+ //Video URL
+ $featured_content = get_post_meta($post->ID, 'ml_fc_lightbox_mov', true)
+ . '?width='
+ . get_post_meta($post->ID, 'ml_fc_featured_content_width', true)
+ . '&height='
+ . get_post_meta($post->ID, 'ml_fc_featured_content_height', true);
+ //Content Poster
+ $content_poster = get_post_meta($post->ID, 'ml_fc_embedded_video_poster', true);
+ $content_poster = get_template_directory_uri() . '/includes/timthumb.php?src=' . $content_poster . '&w=416&h=234&zc=1&q=100';
+ ?>
+
+
+
+
+
+ ID, 'ml_fc_featured_content', true) == 'lightbox_swf') {
+ //Video URL
+ $featured_content = get_post_meta($post->ID, 'ml_fc_lightbox_swf', true)
+ . '?width='
+ . get_post_meta($post->ID, 'ml_fc_featured_content_width', true)
+ . '&height='
+ . get_post_meta($post->ID, 'ml_fc_featured_content_height', true);
+ //Content Poster
+ $content_poster = get_post_meta($post->ID, 'ml_fc_embedded_video_poster', true);
+ $content_poster = get_template_directory_uri() . '/includes/timthumb.php?src=' . $content_poster . '&w=416&h=234&zc=1&q=100';
+ ?>
+
+
+
+
+
+ ID, 'ml_fc_featured_content', true) == 'lightbox_html') {
+ $featured_content = '#lightbox_html_'.$post->ID;
+ //Content Poster
+ $content_poster = get_post_meta($post->ID, 'ml_fc_embedded_video_poster', true);
+ $content_poster = get_template_directory_uri() . '/includes/timthumb.php?src=' . $content_poster . '&w=416&h=234&zc=1&q=100';
+ ?>
+
+
+
+
+
+
+ ID, 'ml_fc_html_content', true); ?>
+
+
+ ID, 'ml_fc_featured_content', true) == 'embedded_audio') {
+ $embedded_audio_mp3 = get_post_meta($post->ID, 'ml_fc_embedded_audio_mp3', true);
+ $embedded_audio_oga = get_post_meta($post->ID, 'ml_fc_embedded_audio_oga', true);
+ ?>
+
+
+
+
+
+
+ ID, 'ml_fc_featured_content', true) == 'embedded_video') {
+ $embedded_video_m4v = get_post_meta($post->ID, 'ml_fc_embedded_video_m4v', true);
+ $embedded_video_ogv = get_post_meta($post->ID, 'ml_fc_embedded_video_ogv', true);
+ $embedded_video_poster = get_post_meta($post->ID, 'ml_fc_embedded_video_poster', true);
+ $embedded_video_height = 'style="height:214px;"';
+ ?>
+
+ >
+
+
+
+
+ ID, 'ml_fc_featured_content', true) == 'embedded_html') {
+ $embedded_html_poster = get_post_meta($post->ID, 'ml_fc_embedded_video_poster', true);
+ $embedded_html_poster = get_template_directory_uri() . '/includes/timthumb.php?src=' . $embedded_html_poster . '&w=416&h=234&zc=1&q=100'
+ ?>
+
+
+
+ ID, 'ml_fc_featured_content', true) == 'slider') { ?>
+
+
+ ID, 'ml_fc_image_slider_'.$slide_num, true);
+ if($slide) {
+ $slide = get_template_directory_uri() . '/includes/timthumb.php?src=' . $slide . '&h=416&w=416&zc=1&q=100';
+ ?>
+
+
+
+
+
+
+ ID), 'full' );
+ $featured_image = $featured_array[0];
+ //add the picture icon to the background of the featured image
+ $featured_class = 'ml_icon_picture';
+ //if have featured image, get it and add a content wrapper
+ if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { ?>
+
+
+
+
+
+
+ */ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/wp-content/themes/fiatlux/includes/loop-portfolio-2cols.php b/src/wp-content/themes/fiatlux/includes/loop-portfolio-2cols.php
index 4b9b1e0..7f1e986 100644
--- a/src/wp-content/themes/fiatlux/includes/loop-portfolio-2cols.php
+++ b/src/wp-content/themes/fiatlux/includes/loop-portfolio-2cols.php
@@ -1,7 +1,4 @@
-
-
-
-
-
-
-
-
- 0 ){
- foreach ( $terms as $term ) {
- echo "- " . $term->name . "
";
- }
- }
- ?>
-
-
-
+ $term->term_id, 'hide_empty' => 1));
+$count = count($terms);
+if ( $count > 0 ){
+?>
+
+
+
+ 'ml_portfolio',
+ 'posts_per_page' => -1,
+ 'orderby' => 'title',
+ 'order' => 'ASC',
+ 'tax_query' => array(
+ array('taxonomy' => 'ml_skill', 'field' => 'slug', 'terms' => $term->slug)
+ )
+);
+query_posts( $args );
+?>
+
-
+
ID, 'ml_skill' ); // get an array of all the terms as objects.
-$terms_slugs = array();
$portfolio_item = '';
-
-foreach( $terms as $term ) {
- $portfolio_item = $portfolio_item . ' ' . 'skill_' . sanitize_title($term->name) . ' '; // save each sanitized name inside the array and add a 'skill_' prefix to prevent conclicts
-}
-
+$portfolio_item = $portfolio_item . ' ' . 'skill_' . sanitize_title($term->name) . ' '; // save each sanitized name inside the array and add a 'skill_' prefix to prevent conclicts
$portfolio_item = $portfolio_item . 'portfolio-item';
?>
>
-
- ID), 'full');
diff --git a/src/wp-content/themes/fiatlux/includes/loop-single-portfolio.php b/src/wp-content/themes/fiatlux/includes/loop-single-portfolio.php
index f8c4f82..1205966 100644
--- a/src/wp-content/themes/fiatlux/includes/loop-single-portfolio.php
+++ b/src/wp-content/themes/fiatlux/includes/loop-single-portfolio.php
@@ -11,7 +11,6 @@ $slides_anim_speed = of_get_option('ml_slides_anim_speed', '0.5') * 1000;
$slides_pause_time = of_get_option('ml_slides_pause_time', '2.5') * 1000;
?>
>
-
-
+
ID, 'id_skill', true);
+
+?>
+
+
+
+
+
+
+ $skill_id,
+ 'hide_empty' => 0,
+ 'orderby' => 'title',
+ 'order' => 'ASC'
+ )
+ );
+ $count = count($terms);
+ if ( $count > 0 ){
+ foreach ( $terms as $term ) { ?>
+
+
>
+
+
+
+
+ 'ml_portfolio',
+ 'posts_per_page' => $latest_n_pictures,
+ 'tax_query' => array(
+ array(
+ 'taxonomy' => 'ml_skill',
+ 'field' => 'slug',
+ 'terms' => $term->slug
+ )
+ )
+ );
+ $loop = new WP_Query( $args );
+ while ( $loop->have_posts() ) : $loop->the_post();
+ //full image URL
+ $featured_array = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );
+ $featured_image = $featured_array[0];
+ //add the picture icon to the background of the featured image
+ $featured_class = 'ml_icon_picture';
+ //if have featured image, get it and add a content wrapper
+ if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) {
+ if ($loop->found_posts == 1) {?>
+
+
+
+
+
+  . '/includes/timthumb.php?src=' . $featured_image . '&h=416&w=416&zc=1&q=100'; ?>)
+
+ ID, 'ml_fc_featured_content', true) == 'slider') {
+ for ($slide_num = 1; $slide_num <= cte_slide_num; $slide_num++) {
+ $slide = get_post_meta($post->ID, 'ml_fc_image_slider_'.$slide_num, true);
+ if($slide) {
+ $slide = get_template_directory_uri() . '/includes/timthumb.php?src=' . $slide . '&h=416&w=416&zc=1&q=100';
+ if ($loop->found_posts == 1) {?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ found_posts == 1) {?>
+ name; ?>
+ description,30); ?>
+
+
+ name; ?>
+ description,30); ?>
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/wp-content/themes/fiatlux/taxonomy-ml_skill.php b/src/wp-content/themes/fiatlux/taxonomy-ml_skill.php
new file mode 100644
index 0000000..f441d04
--- /dev/null
+++ b/src/wp-content/themes/fiatlux/taxonomy-ml_skill.php
@@ -0,0 +1,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/wp-content/themes/fiatlux/template-skill-2cols.php b/src/wp-content/themes/fiatlux/template-skill-2cols.php
new file mode 100644
index 0000000..5164cef
--- /dev/null
+++ b/src/wp-content/themes/fiatlux/template-skill-2cols.php
@@ -0,0 +1,14 @@
+
+
+
+
+
\ No newline at end of file