[wdvltalk-social] timed content php [also to dev-talk]

Christina Lannen chris at lannendesigns.com
Thu Feb 25 13:59:39 GMT 2010


Are you adding the "daily fact" as a post?  If yes, you can schedule them.
I would add a specific category for the facts.

One example of code would be:

<ul>
<?php query_posts('cat=5&showposts=3'); ?> // the category is 5 and pull in
3 posts
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post();?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Read
More"><?php the_title(); ?></a></li>
<?php endwhile; ?>
<?php endif; ?>
</ul>


The WordPress codex can be your best friend.

Chris
http://www.lannendesigns.com/ 

-----Original Message-----
From: wdvltalk-social-bounces at wdvltalk-social.org.uk
[mailto:wdvltalk-social-bounces at wdvltalk-social.org.uk] On Behalf Of
smile-poetry
Sent: Thursday, February 25, 2010 8:45 AM
To: Web development and beer
Subject: [wdvltalk-social] timed content php [also to dev-talk]

Okay, I've settled on Wordpress because it is the simplest option
technically - and well supported. I have also gone for a rather clunky theme
- Typograph.

I want to add a daily fact and there is a convenient tabbed box on the
right, and I am adapting the 'about' tab. Below is the script for that.

I will need to have a script to pick up the day's info from tables - that
much I remember! But I have no easy recall of how to get from here to what
I'm aiming for.

I plan a second part to it to pick up a saying or one liner from a table
too, possibly randomly.

I'm not sure if there might be a chron way to this, or whether I'd need a
chron set up anyway! All advice welcome.

Joseph


Here is the script:

</div>
   <div id="categories" class="content">
    <ul>
     <?php list_cats(); ?>
    </ul>
   </div>
   <div id="about" class="content">
    <h4>today is Typograph wpTheme</h4>
    <p><a
href="http://blog.pinkandyellow.com/free-wordpress-themes/typograph/"
title="Typograph theme home">Typograph</a> is a standards compliant theme
with a JQuery powered tabbed sidebar box and an ad under the first post on
the index page. This theme has no images and is purely based on CSS elements
and typography. Ideal for future customization. Typograph was styled "from
the ground up" on a highly customized version of the <a
href="http://wordpress.org/extend/themes/sandbox#post-35">Sandbox
theme</a>.</p>
       <p>Designed by Morten Rand-Hendriksen - designer, information
philosopher and author based out of Burnaby, BC.</p> 
    <p>And presumable take in thought for th dayYou can change the contents
of the tabbed box by editing the tabbedBox.php file located in the Typograph
theme directory.</p>
   </div>
   <div id="rss" class="content">
    <h1><a href="<?php bloginfo('url'); ?>/rss" title="Subscribe to the
<?php bloginfo('name') ?> RSS Feed" rel="rss">Subscribe to my feed</a></h1>

   </div>
   <div id="search" class="content">

And here the change to the box name ['Cats' is a shortening to stop the tabs
turning]:

<div id="tabContainer">
  <div id="tabMenu">
   <ul>
    <li><a href="menu" class="active">Menu</a></li>
    <li><a href="categories">Cats</a></li>
    <li><a href="about">This Day</a></li>
    <li><a href="rss">RSS</a></li>
    <li><a href="search">Search</a></li>
   </ul>
  </div>


[soon I'll need to understand RSS! and other feeds]

Joseph Harris 
_______________________________________________
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