[wdvltalk-social] Question on Wordpress

Christina Lannen chris at lannendesigns.com
Tue Sep 25 15:20:55 BST 2012


Why do you think you need to turn it into a template?  WordPress
automatically knows which file to use (index.php, page.php or single.php).
Your theme doesn't have a category.php, archive.php or archives.php, and
themes do not need them.

If you really need to create a custom Page template do a Save As and give it
a name, e.g., custom-page.php (use either the index.php or page.php) and
then add the following to the very top:

<?php
/*
Template Name: Whatever you want to name it here,  e.g., Custom Page
*/
?>

Modify the template file as needed.  Then upload it and then select the
template from the dropdown in the WP Page admin (where you're writing a new
Page).

If you need a category specific template, you can use index.php file and if
the category number was 6 then you save it as category-6.php.  WP will
automatically pick it up.

Chris

-----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: Tuesday, September 25, 2012 7:06 AM
To: Web development and beer
Subject: [wdvltalk-social] Question on Wordpress

I'm not sure if anyone feels like answering questions from me, but I am
seriously in need of a nudge.

I've been away from activity, though still in touch, for a few years. 
Among the better reasons is that what was supposed to be a fairly short poem
of about 40 lines turned into a major project, and I now have a long book
that in its early, post-poem, days was going to be short. So I am now
setting up my website, as simply as possible using Worpress and Boozurk
theme [That theme because I want the book cover pic on the top left].

I will be puting this volume up initially. Later I will be adding both those
existing works, and those on the long to-do list I have. The articles, blogs
in this context - which relate to each area, need an immediate visual
distinction; My plan is to put a strap above the normal article heading, as
well as using categories, of course.

All the advice I have seen on templates leaves me pretty mystified, perhaps
because I don't recall enough php yet. I think the relevant part of page.php
is this:

<div id="posts_content">
<?php if ( have_posts() ) {
         while ( have_posts() ) {
             the_post(); ?>
<?php boozurk_hook_before_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <?php
boozurk_extrainfo(); ?> <?php boozurk_hook_before_post_title(); ?> <?php
boozurk_featured_title( array( 'featured' => true ) ); ?> <?php
boozurk_hook_after_post_title(); ?> <?php
boozurk_hook_before_post_content(); ?> <div class="storycontent"> <?php
the_content(); ?> </div>

I can't work out what to do to turn this into a template, and how or where
to place the page [and post which I believe will be similar] that will be
called to put that strap above the heading. And how to make sure it will be
called when that template is selected. In part I am not sure where the page
layout is kept; though I take it one simply adds the strap which
distinguishes that group of pages [and separately posts] above the title
code on that.

Many thanks for any advice.

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