Display pages from specific page template

Use get_post_field(‘post_content’, $product_page->ID ) to get the content outside loop. <?php $product_pages_args = array( ‘meta_key’ => ‘_wp_page_template’, ‘meta_value’ => ‘page_library_html.php’ ); $product_pages = get_pages( $product_pages_args ); ?> <?php foreach ( $product_pages as $product_page ) { echo ‘<div id=”posts” class=”flex_100″>’; echo ‘<div id=”library_title”><a href=”‘ . get_permalink( $product_page->ID ) . ‘”>’ . $product_page->post_title . ‘</a></div>’; echo ‘<div … Read more

CSS conditional on custom field value

Without any other context (which means you will likely need to adapt to your specific needs), I would consider using the post_class filter. Using this filter, you can access the post meta for the current post, and conditionally add a CSS class to the post container. For example: function wpse129167_filter_post_class( $classes, $class, $postid ) { … Read more

Display ajax preloader for large images within posts

How you said one option is to place a preloader while the image is loading. If you cannot touch so deep with JavaScript and PHP I have one simple sugestion which I think will work for you. <div class=”image-preloader”> <img src=”https://wordpress.stackexchange.com/questions/129186/yourimage.jpg” alt=”” /> </div> Create a wrapper (holder) around your image. With CSS put the … Read more

Combining fancybox with multiple thumbnail plugin

I managed to get the result on my own after much playing with the codes. Here is the working code 🙂 <div class=”collections_dresses_container”> <?php query_posts(‘posts_per_page=-1&cat=10’); if(have_posts()) : while(have_posts()) :the_post(); ?> <div class=”collections_thumbnails”> <?php $imgID = get_post_thumbnail_id(); $url = MultiPostThumbnails::get_post_thumbnail_url(get_post_type(), ‘secondary-image’); ?> <?php if ( has_post_thumbnail()) { $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), ‘large’); echo ‘<a class=”fancybox” href=”‘ … Read more

featured post as div background

You’re code is not working as you have an echo within an echo, try this code (not tested) <?php echo ‘<div id = “circ” style=”background: url(‘.$src[0].’><ul><li><a href = “‘.the_permalink().'</a></li></ul></div>’; ?> If you’re echo’ing something and then you want to add php within that echo you need to break the echo by adding ‘. $variable .’

Syling Custom Fields echo’s from from functions.php

How about just echoing out the needed syntax like that: echo ‘<div class=”custom-field”>’ . genesis_get_custom_field(‘instrument’) . ‘</div>’; You can also just use CSS and style the header.entry-header { //your sexy styles goes here } Since other elements inside are wrapped in their own elements and styled separately (I mean the actual H1 and meta data) … Read more