|
|
@@ -665,6 +665,46 @@ function carousel_shortcode_func($atts) {
|
|
|
}
|
|
|
add_shortcode('carousel', 'carousel_shortcode_func');
|
|
|
|
|
|
+// Hover Boxes
|
|
|
+
|
|
|
+function hoverboxes_shortcode_func($atts) {
|
|
|
+ $a = shortcode_atts( array(
|
|
|
+ 'type' => NULL
|
|
|
+ ), $atts );
|
|
|
+
|
|
|
+ $output = "";
|
|
|
+
|
|
|
+ // images (gallery)
|
|
|
+ $tdaQuery = new WP_Query(array('post_type' => $a['type']));
|
|
|
+ if($tdaQuery->have_posts()) {
|
|
|
+ $output .= "<div class=\"col-md-12 tda-gallery clearfix\">" . PHP_EOL;
|
|
|
+ $output .= "<div class=\"row\">" . PHP_EOL;
|
|
|
+ while($tdaQuery->have_posts()) {
|
|
|
+ $tdaQuery->the_post();
|
|
|
+ $output .= "<div class=\"col-md-3 col-xs-4 tda-item\" style=\"padding-bottom: 15px;\">" . PHP_EOL;
|
|
|
+ $output .= "<div class=\"relcontainer\">" . PHP_EOL;
|
|
|
+ $output .= "<a href=\"" . get_permalink() . "\">" . PHP_EOL;
|
|
|
+ if(has_post_thumbnail()) {
|
|
|
+ $output .= get_the_post_thumbnail(get_the_ID(), 'thumbnail', array('class' => 'tda-gallery-item')) . PHP_EOL;
|
|
|
+ }
|
|
|
+ $output .= "<div class=\"tda-hover\">" . PHP_EOL;
|
|
|
+ $output .= "<div class=\"relcontainer\">" . PHP_EOL;
|
|
|
+ $output .= "<span>" . get_the_title() . "</span>" . PHP_EOL;
|
|
|
+ $output .= "</div>" . PHP_EOL;
|
|
|
+ $output .= "</div>" . PHP_EOL;
|
|
|
+ $output .= "</a>" . PHP_EOL;
|
|
|
+ $output .= "</div>" . PHP_EOL;
|
|
|
+ $output .= "</div>" . PHP_EOL;
|
|
|
+ }
|
|
|
+ $output .= "</div>" . PHP_EOL;
|
|
|
+ $output .= "</div>" . PHP_EOL;
|
|
|
+ }
|
|
|
+
|
|
|
+ return $output;
|
|
|
+}
|
|
|
+
|
|
|
+add_shortcode('hoverboxes', 'hoverboxes_shortcode_func');
|
|
|
+
|
|
|
/* TITLE STUFF */
|
|
|
|
|
|
function ams_modify_titles($title, $id = null) {
|