I have used a custom image as the title instead of the wordpress page title. It works fine…
However, I have deleted the page title from the wordpress page, but the space where the title should be is still there.
I want this space to dissapear so the image title moves up to the top.
Also, I have just realised that getting rid of the title of the page obviously has got rid of the page title for that page from the nav bar.
So to re-jig my question a bit, how do I get rid of the page title from the page so that I can have an image in its place but yet keep the text title on the nav bar?
Can you post a link to your site with the modifications?
How have you added the image?
To get rid of the title text on a post or page just find and delete this code:
<h2><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
Bear in mind that this will affect all the posts (single.php) and pages (page.php) you have so you could consider conditional variables if you only want to remove the text from some pages.
Yeh i figured that much out, i deleted that text from the page.php file but saved it as page2.php and added:
Template Name: PAGE2
at the top to define it as a new page template, then for the wordpress page I set it to the template “PAGE2”.
This has done the job and not messed up any other pages. :)
The topic ‘Image instead of title on page…’ is closed to new replies.