• Hi all,

    I want to ask.

    In my site, there a page called “About Us, “Live Stream”, and many else.

    If I click the page, for example, “Live Stream”, the page is show with the title “Live Stream” in text mode.

    I want to change the text mode into image. So, for example, If I click “Live Stream”, the page is show, but not in text again, but into image, that I’ve already prepared.

    Can some one help me?

Viewing 2 replies - 1 through 2 (of 2 total)
  • within the loop on page.php (or template your pages use) you could do something like:

    <h2><?php if (is_page('live stream')) echo "<img src="livestream.jpg" />";
    elseif (is_page('about us')) echo "<img src="aboutus.jpg" />";
    else echo the_title(); ?></h2>

    where the_title() call would normally be.

    I am trying to do a similar thing, replace the name that shows in text at the top of my home page with a .jpg image.

    At the moment it shows in page.php

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class=”post” id=”post-<?php the_ID(); ?>”> <h2 class=”title”><?php the_title(); ?></h2> <div class=”entrytext”> <?php the_content(‘<p class=”serif”>Read the rest of this page »</p>’); ?> <?php link_pages(‘<p>Pages: ‘, ‘</p>’, ‘number’); ?>

    i am not sure exactly where to put the jpg image name?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to change page title into Image’ is closed to new replies.