• I know just enough to be dangerous and not enough to solve my own problems. (I have a design background, not a programming background.)

    Anyway, I would like to append the Ω symbol to the end of my posts. In HTML, this is represented as Ω.

    In order to append to the post, we opened the “template-functions-post.php” file and inserted the following line:

    $content .= '&Omega';

    into this section of the document:

    function the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
    $content = get_the_content($more_link_text, $stripteaser, $more_file);
    $content .= '&Omega';
    $content = apply_filters('the_content', $content);
    $content = str_replace(']]>', ']]>', $content);
    echo $content;
    }

    Doing so indeed appends the end of the post entry, *but* instead of displaying the Ω symbol, it displays Ω.

    How can I make sure that the Ω symbol displays properly right after the last word in my post? (No line breaks of returns.)

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Meljgrey,

    Firstly, thank you! I’ve been trying to figure out how to add an end of proof mark to my posts.

    I’ve figured out the Ω sign, you need to add the $content .= ‘&Omega’; right before the last line in the function, so it looks like this:

    $content .= ‘&Omega’;
    echo $content;

    That will display the Ω properly. On mine, it does start it on a new line though. I’m not sure how to change that aspect of it.

    If you or anyone else knows how or has figured out how to append the content inline with the rest of the text, please post the solution!

    Thanks and cheers,
    Michael.

    Thread Starter meljgrey

    (@meljgrey)

    Thanks, Michael. I, too, was able to get it to show properly, but just as you did, starting on a new line. Obviously, some mechanism that displays the post is ending with a , to start a new paragraph.

    The question is: Where is the code that’s inserting that and how do we get our character in front of it?

    Code jockeys, come to our rescue!

    /melissa

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Appending a symbol at the end of the Post?’ is closed to new replies.