Mark Shirley
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Display custom field content in a page of postsSorry just looked at my template and the code you supplied is what im using and it works to show my custom field data on my page or post. I have a page that is outputting a numer of custom posts but the custom fields dont show only the content inputed in the page editor.
Forum: Fixing WordPress
In reply to: Display custom field content in a page of postsThanks Christine is this added to the function file or in the template file.
my friend managing to do it with a genesis template using the code below but im using a child of twenty eleven
add_action(‘genesis_post_content’, ‘custom_field_appointments’,14);
function custom_field_appointments() {
if ( is_single() && genesis_get_custom_field(‘appointments’) )
echo ‘<div id=”appointments”><div class=”header”>Appointments</div>’. genesis_get_custom_field(‘appointments’) .'</div>’;
}Forum: Fixing WordPress
In reply to: changing font and link color in a themeelement.style { color: #CC99FF; }change this in tour custom.css to below:
element.style { color: red ; }Forum: Fixing WordPress
In reply to: excerpts on a page templateFinal code does exactly what I wanted – big shout out to alchymyth cheers pal. 🙂
<?php $query = new WP_Query( array( 'post_type'=> 'Movies', 'actors' => 'peter-smith', 'actress' => 'jane-smith' ) ); if( $query->have_posts() ) : while( $query->have_posts() ) : $query->the_post(); the_excerpt(); endwhile; endif; wp_reset_postdata(); ?>Forum: Fixing WordPress
In reply to: excerpts on a page templateThis works a treat
<?php $query = new WP_Query( array( 'actors' => 'peter-smith', 'actress' => 'jane-smith' ) ); if( $query->have_posts() ) : while( $query->have_posts() ) : $query->the_post(); the_excerpt(); endwhile; endif; wp_reset_postdata(); ?>Forum: Fixing WordPress
In reply to: excerpts on a page templateNow if I could add the post type that would give me a lot of flexibility but happy with what I’ve got at the moment 🙂
Forum: Fixing WordPress
In reply to: excerpts on a page templateI’ve managed to get it working just targeting a taxonomy term
<?php $query = new WP_Query( array( 'actors' => 'peter-smith' ) ); if( $query->have_posts() ) : while( $query->have_posts() ) : $query->the_post(); the_excerpt(); endwhile; endif; wp_reset_postdata(); ?>Forum: Fixing WordPress
In reply to: excerpts on a page templateUmhh thanks – I get all 3 post excerpts displaying despite the fact I put in a different taxonomy term in the 3rd CPT.
code used:
<?php $query = new WP_Query( array( 'post_type'=> 'Movies', 'Actors' => array('peter-smith','mary-brown') ) ); if( $query->have_posts() ) : while( $query->have_posts() ) : $query->the_post(); the_excerpt(); endwhile; endif; wp_reset_postdata(); ?>Forum: Fixing WordPress
In reply to: excerpts on a page templateI tried this below but my browser just went blank – we are nearly there
<?php $query = new WP_Query( array( 'post_type'=> 'Movies', 'Actors' => array('peter-smith','mary-brown') ); if( $query->have_posts() ) : while( $query->have_posts() ) : $query->the_post(); the_excerpt(); endwhile; endif; wp_reset_postdata(); ?>Forum: Fixing WordPress
In reply to: excerpts on a page templateBrilliant – thanks – wow – i’ve been trying to do this for days. Question if I wanted to show just the excerpts from say a taxonomy of actor and taxonomy terms peter smith and mary brown what would the code be.
Thanks your a star alchymyth 🙂
Forum: Fixing WordPress
In reply to: excerpts on a page templateSee 2 posts above…
I have managed to do it by using a shorcode plugin but wanted to code it and do without the pluginshort code:
[display-posts post_type="movies" taxonomy="actors" tax_term="red" image_size="thumbnail" include_excerpt="true"]Forum: Fixing WordPress
In reply to: excerpts on a page templateSee above – this is my last stab at code for it
<?php $query = new WP_Query( array( 'post_excerpt' => 'post_type'=> 'Movies', ) ); ?>Forum: Fixing WordPress
In reply to: excerpts on a page templateHi thanks for the reply …ok
I have a number of custom post types called Movies inside those CPT’s I have created excerpts. I have then created a page with a template to display the excerpts.
Oh sorry Justin got mixed up I couldnt get your to work so I tried another one that worked – thanks for your time it’s much appreciated.
Forum: Fixing WordPress
In reply to: excerpts on a page templateThanks alchymyth
I’ve read that article and tons of others but no mention on how to display just a page excerpts