ThemeShaper Forums » Thematic


Inserting Custom Field Text Below Title? (Byline)

(4 posts)
  • Started 11 years ago by joeM
  • Latest reply from em hr
  • This topic is not resolved
  1. First off, I am really enjoying Thematic! Thank you for making such a powerful theme and offering free support. I've been slowly learning how to do customizations for Thematic and this has brought me down the path to explore more ways to mold and shape it towards my needs.

    My question:
    How can I insert the text of a custom field of a Post below the title, above the meta data of the post?


      Hello World!
      Saying hello to the world from a script
      Published by by XXX on XXX.
      [Body of the post]

    I've been playing around with a customization and tweaking it for my needs. Currently, it shows the text right above the title. :(

    Any ideas, suggestions?


    Posted 11 years ago #
  2. Hey Joe-

    Post the code you're using to insert the custom field.


    Posted 11 years ago #
  3. @em hr -- Again, this code doesn't work, but it gets me *close* to where I want the text. Looking forward how to make it where it works. :)

    function my_postheader($postheader) {
    $values = get_post_custom_values("Byline");

    if ($values != '') {
    $ph = $postheader;
    $postheader = '<span class="byline">';
    $postheader .= $values[0] . '</span>';
    $postheader .= $ph;
    return $postheader;
    add_filter('thematic_postheader', 'my_postheader');

    Posted 11 years ago #
  4. Try filtering the post meta and putting your byline in front like:

    function my_postbyline($postmeta) {
     $values = get_post_custom_values("Byline");
     if ($values != '') {
    	$post_byline = '<span class="byline">';
    	$post_byline  .= $values[0] . '</span>';
    	$post_byline  .= $postmeta;
     return $post_byline;
    add_filter('thematic_postheader_postmeta', 'my_postbyline');
    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.