knolan2
Forum Replies Created
-
Hi! I love this plugin but I am going to have to switch if I can’t figure out a solution to this problem.
Forum: Hacks
In reply to: Archive taxonomy not working for one taxonomyAh you were right! I don’t know how that happened. Thank you so much!
Forum: Hacks
In reply to: Archive taxonomy not working for one taxonomyThe taxonomy term is edgartown-ma. It doesn’t match another directory on the server. https://localhost/wp/location/edgartown-ma/. Every other location works too.
Forum: Hacks
In reply to: Attach custom field thumbnail using phpI tried it wasn’t working. I changed the code to use the feature image as the thumbnail. If anyone wants to know what I did:
<?php /* Set variables and create if stament */ $thumb_id = get_post_thumbnail_id(); $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail-size', true); $thumb_url = $thumb_url_array[0]; $videosite = get_post_meta($post->ID, 'Video Site', single); $videoid = get_post_meta($post->ID, "Video ID", single); if ($videosite == vimeo) { echo '<a class="fancybox" title="" href="https://www.vimeo.com/'.$videoid.'"><span class="tv-title">'. get_the_title() .'</span><img src="' . $thumb_url . '" /></a>'; } else if ($videosite == youtube) { echo '<a class="fancybox" title="" href="https://www.youtube.com/watch?v='.$videoid.'?fs=1&autoplay=1"><span class="tv-title">'. get_the_title() .'</span><img src="' . $thumb_url . '" /></a>'; } else { echo 'Please Select Video Site Via the CMS'; } ?>
Forum: Hacks
In reply to: Attach custom field thumbnail using phpI changed part of the code to:
<?php /* Set variables and create if stament */ $video_thumbnail = get_post_meta($post->ID, 'Video Thumbnail'); $videosite = get_post_meta($post->ID, 'Video Site', single); $videoid = get_post_meta($post->ID, "Video ID", single); if ($videosite == vimeo) { echo '<iframe src="https://player.vimeo.com/video/'.$videoid.'" width="300" height="200" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'; } else if ($videosite == youtube) { echo '<a class="fancybox" title="" href="https://www.youtube.com/watch?v='.$videoid.'?fs=1&autoplay=1"><img src="' .$video_thumbnail. '" /></a>'; } else { echo 'Please Select Video Site Via the CMS'; } ?>
and now I am getting the img src= array
Forum: Plugins
In reply to: [Galleries by Angie Makes] Can it be used with different lightbox script?This worked for me in my functions.php file
add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 ); function my_deregister_javascript() { wp_deregister_script( 'wc-gallery-popup' ); } if ( has_post_thumbnail() ) { $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' ); echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute( 'echo=0' ) . '">'; the_post_thumbnail( 'thumbnail' ); echo '</a>'; }
Forum: Fixing WordPress
In reply to: Search page posts 1 postThanks that worked! I took my code and made it into a content-search.php template and used the 2014 search code and replaced
get_template_part( 'content', get_post_format() );
with
get_template_part( 'content-search', get_post_format() );
Thanks for your help
Forum: Fixing WordPress
In reply to: Search page posts 1 postIt didn’t work but thanks for the edit! Here is the whole code:
<?php /** * The template for displaying Search Results pages * * @package WordPress * @subpackage Twenty_Fourteen * @since Twenty Fourteen 1.0 */ get_header(); ?> <section id="primary" class="content-area"> <div id="content" class="site-content" role="main"> <header class="page-header"> <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1> </header><!-- .page-header --> <?php if (is_search()): ?> <ul class="filterable-grid clearfix"> <li> <a href="<?php the_permalink(); ?>" > <figure class="bw"> <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) : ?> <?php the_post_thumbnail('houses, press, news'); ?> <?php endif; ?> <figcaption> <?php $args = array('number' => '1',); $terms = wp_get_post_terms($post->ID, 'location', $args); foreach( $terms as $term ){ echo get_the_title() , '</br> ', $term->name; } ?> </figcaption> </figure> </a> </li> <?php $count++; ?> </ul> <?php endif ?> </div><!-- #content --> </section><!-- #primary --> <?php get_sidebar( 'content' ); get_sidebar(); get_footer(); ?>
Forum: Installing WordPress
In reply to: get_terms not working for one taxonomyThank you!!! That works perfectly!