[wdvltalk-social] Question on Wordpress

Christina Lannen chris at lannendesigns.com
Wed Sep 26 12:53:53 BST 2012


Should be okay, and you won't know until you see it, and you just might need
to add some css to the h4 tag.  But honestly you'd be further ahead to use
custom fields that text to see if there is any content and if there isn't
don't output anything.

<?php 
$agentcell = get_post_meta($post->ID, "agent_cell", true);
// check to see if the field has information in it
// and if it doesn't don't echo out "Cell: "
if ($agentcell != "")
{
echo "Cell: ";
echo $agentcell;
echo "<br />";
}
?>

-----Original Message-----
From: wdvltalk-social-bounces at wdvltalk-social.org.uk
[mailto:wdvltalk-social-bounces at wdvltalk-social.org.uk] On Behalf Of joseph
Sent: Wednesday, September 26, 2012 6:31 AM
To: Web development and beer
Subject: Re: [wdvltalk-social] Question on Wordpress


Right, I think I've worked out what to do. I realise how badly I'd described
it - if I have this right. I have taken single.php, called it Gordon.php and
made these changes (I've just put the few lines] I've added asterisks to
show my changes.:

(top)
<?php
/*
Template Name: Gordon
*/
?>****

<?php get_header(); ?>

(above content)
<?php boozurk_hook_before_posts(); ?>
<h4 style="color: #a9a9a9;">DIRTY TRICKS KILLED LORD GEORGE GORDON</h4>****
<div id="posts_content"> <?php if ( have_posts() ) {
         while ( have_posts() ) {
             the_post(); ?>

(below content)
<?php boozurk_hook_after_post_title(); ?> <?php
boozurk_hook_before_post_content(); ?> <div class="storycontent"> <?php
the_content(); ?> <a>link material</a>***** <?php if (
!post_password_required() && isset(
$boozurk_opt['boozurk_post_formats_audio' ] ) &&
$boozurk_opt['boozurk_post_formats_audio' ] == 1 )
boozurk_add_audio_player(); ?> </div>

Before I put this in place, can you just confirm it looks OK [and I know I
should have used css for the colour!]? Do I need "div" as well?

Joseph



_______________________________________________
wdvltalk-social mailing list
wdvltalk-social at wdvltalk-social.org.uk
http://www.wdvltalk-social.org.uk/mailman/listinfo/wdvltalk-social

(This is via the new sever, lyla)



More information about the wdvltalk-social mailing list