Make title and content written in the top of the page diffrent
-
Goto admin->page->goto that page where you want to change. Create a custom field “heading_of_the_page” in the page where you want to change in the content heading and title diffrent. For example if “contact us” is the link name(title) but when we will click on the “contact us” in the top of the content page “contact with us” should be written,like this you want.Then place “contact with us” in the field value of custom field “heading_of_the_page”.or whatever the heading you want,place just place here.
Now goto wp-content/themes/[YOUR THEME]/page.php
Search here:
<h2 class=”posttitle”>“
rel=”bookmark” title=”Permanent Link to <?php
the_title_attribute(); ?>”><?php the_title(); ?>here just replace the_title(); with a some line of code:
$a=get_post_custom_values(‘heading_of_the_page’);
if($a==0)
{
$b=the_title();
echo $b;
}
else
{
echo $a[0];
}Upload this page again and see the affect in the front end.
The blog I need help with is: (visible only to logged in users)
-
If you are editing the PHP files you are way in the wrong Forum – WordPress.COM sites do not allow the editing of PHP files for security reasons. NO site hosted on WordPress.COM can use your code bit.
You should address your questions to WordPress.ORG the keepers of the software you are using: http://wordpress.org/support/
For more on the difference: http://support.wordpress.com/com-vs-org/
-
- The topic ‘Make title and content written in the top of the page diffrent’ is closed to new replies.