I've created a page template called discografia.php.
This page is identical to the index.php.
On my functions.php, I've this code:
function tamtando_more_text($content) {
$content = ' ... continua ... ';
return $content;
}
add_filter('more_text', 'tamtando_more_text');
function tamtando_content($content) {
if(is_page()){
$content= 'full';
}
return $content;
}
add_filter('thematic_content', 'tamtando_content');
// The Index Loop
function remove_index_loop(){
remove_action('thematic_indexloop', 'thematic_index_loop');
}
add_action('init','remove_index_loop');
function tamtando_index_loop() {
global $options;
foreach ($options as $value) {
if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; }
else { $$value['id'] = get_option( $value['id'] ); }
}
$query_string = '';
if(is_page_template()){
if(is_page_template('discografia.php')) {
$query_string = 'category_name=discografia';
}
}
global $wp_query;
if($query_string) {
$query_string .= '&posts_per_page=-1';
query_posts($query_string);
}
/* Count the number of posts so we can insert a widgetized area */ $count = 1;
while ( have_posts() ) : the_post() ?>
<div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
<?php thematic_postheader(); ?>
<div class="entry-content">
<?php thematic_content(); ?>
<?php wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?>
</div>
<?php thematic_postfooter(); ?>
</div><!-- .post -->
<?php comments_template();
if ($count==$thm_insert_position) {
get_sidebar('index-insert');
}
$count = $count + 1;
endwhile;
}
add_action('thematic_indexloop', 'tamtando_index_loop');
The page is here: http://tamtando.sciamanna.me/il-gruppo-musicale/discografia/
...and it doesn't work.
As "tamtando_content()" says, if I'm in a page (and, despite the code inside, http://tamtando.sciamanna.me/il-gruppo-musicale/discografia/ is a page and is using the right page template), I must see the full content (or excerpt if I used the "more" shortcode) including the attachments.
Instead I'm seeing an archive-like page: why?