Topic: How to use meta on tapestries.php
I am using "PER LINE" settings on my theme arras option to display in categories.
Now I want to add meta on "PER LINE", but how?
I have written a custom field key on my post named "title" and value of some title (whatever).
Now i need to call the meta in "PER LINE" (tapestries.php), so i use this code
<?php if ( get_post_meta($post->ID, 'title', true) ) : ?>
<?php echo get_post_meta($post->ID, 'title', true) ?>
<?php endif; ?>
as stated in wordpress codex ( http://codex.wordpress.org/Function_Ref … _post_meta )
but when i tried to put it in that code in the tapestries.php it doesn't work. The "PER LINE" in tapestries.php code should look like this.
/**
* Per Line tapestry callback function.
* @since 1.4.3
*/
if (!function_exists('arras_tapestry_line')) {
function arras_tapestry_line($dep = '', $taxonomy) {
?>
<a rel="bookmark" href="<?php the_permalink() ?>" title="<?php printf( __('%s', 'arras'), get_the_title() ) ?>"><li <?php arras_post_class() ?>>
<h3 class="entry-title"><?php the_title() ?></h3>
<p class="entry-comments"><?php comments_number() ?></p>
</li></a>
<?php
}
arras_add_tapestry( 'line', __('Per Line', 'arras'), 'arras_tapestry_line', array(
'before' => '<ul class="hfeed posts-line clearfix">',
'after' => '</ul><!-- .posts-line -->'
) );
}I'm thinking tapestries.php is outside the loop? or am i using the wrong meta code? I'm not sure. I'm not a php guy that much, i just understand some basics of it.
Thank for any help.
Last edited by s2pidkaspr (2012-01-13 23:52:51)