ThemeShaper Forums » Thematic

Featuresite: dynamic “recent posts” feature-front-1/2/3.php

(6 posts)
  • Started 12 years ago by Manuel
  • Latest reply from Manuel
  • This topic is not resolved
  1. Think it would be much easier if you could pick your feature-front-1/2/3….php title & content from existing posts. Lets say I want 3 feature-fronts and they shall show the title & content of the latest 3 posts.

    Is that possible somehow?

    Posted 12 years ago #
  2. Hope you get my drift. This would be so much slicker than editing your feature-front-*.php content in by hand and via ftp. :)

    This should also be limited to a “feature-articles” category to make it even easier!

    Instead of include "includes/feature-front-$rand.php"; in the functions.php something like query_posts('showposts=1&category_name=feature-articles'); and for the feature image (with appropriate styling to make it fit in the fixed size frame) something like

    <?php
    
    $args = array(
    	'post_type' => 'attachment',
    	'numberposts' => -1,
    	'post_status' => null,
    	'post_parent' => $post->ID
    	);
    $attachments = get_posts($args);
    if ($attachments) {
    	foreach ($attachments as $attachment) {
    		echo apply_filters('the_title', $attachment->post_title);
    		the_attachment_link($attachment->ID, false);
    	}
    }
    
    ?>
    Posted 12 years ago #
  3. Guess a modified Acamas “latest feature” code could be used for this + the attachment example code (mentioned above) I found in the WP codex.

    And I say it again: This would be sooo much easier + practical. ;)

    Posted 12 years ago #
  4. Hi Manuel,

    mmh .. will think about it ...

    What about having a Theme option for switching between the product type thing and a Featured Content thing?

    In addition I could create something that makes that product thing easier.

    The final decision about an integration is up to Ian.

    Chris

    Posted 12 years ago #
  5. A theme option would come in handy for sure. Although I don’t really understand what you mean by that. :D

    I only thought of the idea to put articles one wants to have “featuresited” in a special category (because “stepping back” to ftp editing of files for something you want to stick out seems kinda, well, like a step back (example: you can’t do that while on the go using the iPhone WordPress app) — but maybe that’s just me.

    Pages, as static as they are and usually only filled with non-spectacular content like “contact” and “about” don’t usually benefit from being featured — I guess, so there is no need to give them a “feature-button”.

    Posted 12 years ago #
  6. So sorry to bother you with such “ideas” every now and then. I guess I should really start to read a book about this PHP thing. Feels like I’m on vacation and I can’t even order a simple coffee without using hand gestures.

    Posted 12 years ago #

RSS feed for this topic

Reply

You must log in to post.