[wdvltalk-social] Question on Wordpress

joseph smilepoet at vfemail.net
Wed Sep 26 14:21:59 BST 2012


Chris,

Thanks for that confirmation. I see that custom fields can be used in 
many ways, but to achieve what I am looking is most certainly beyond my 
memory of code at the moment. It will be easier to use html on the 
template file, because the information I'm adding on each template will 
not change and would be used on up to 40 posts in some cases. You're 
right that I might have to look at the css for the h4 - it is probably 
centred as well which I don't want - but changing detail on an entry 
should not be difficult for me :-) .

Most posts will link to a book or group of books, but it would not 
always be immediately obvious which an individual post relates to. I 
won't have a need to change any template, nor bring contemporary 
information into it. So this solution is one I can manage. You really 
have helped to rub some of the rust away and I'm grateful to you.

Joseph PS Just had a look at the boozurk css. They have left it pretty 
empty, no attributes on any "h"s; it might be a bit too unformed for me 
as the theme for now. But there are quite a few that have loads of 
content design already - I'll see. For the moment I'll turn to getting 
content uploaded and then get the site visible.


> 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
>
>    


More information about the wdvltalk-social mailing list