Jump to content
Sign in to follow this  
ringo1

How can I add a title to my posting page?

Recommended Posts

ringo1

Hi people, All the pages of my site have an H2 title that I've added in the content in the body above the rest of the text. I've set up a page called 'News and Events' that the client can send posts to. I'd like this page to have this title but don't know if it's possible or how to do it. Any thoughts welcome, thanks!

Share this post


Link to post
Share on other sites
ringo1
Hi Jimmy, all the pages have a header in the body like this: http://www.onet-it.com/?page_id=27 This is the page that has posts sent to it... http://www.onet-it.com/?page_id=833 Would just like it to keep the look consistent with "COMPANY NEWS" at the top.

Share this post


Link to post
Share on other sites
kastelic
Try this in platformbase/functions.php: [code] add_action('pagelines_before_maincontent','blog_heading'); function blog_header(){ if ( is_home() ){ echo "

News

"; } } [/code]

Share this post


Link to post
Share on other sites
ringo1
I just tried that and I'm not really sure where to put it in the functions.php? I just copied and pasted it in and got this error: Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'blog_heading' was given in /home1/olympusn/public_html/onetit/wp-includes/plugin.php on line 405.

Share this post


Link to post
Share on other sites
kastelic
Have you activated the Base child theme? It needs to go into platformbase/functions.php , not platformpro/functions.php

Share this post


Link to post
Share on other sites
ringo1
Yes, been using the base theme. Any particular place to put it?

Share this post


Link to post
Share on other sites
Kate
The error is because the hook is calling "blog_heading", when the function was actually named "blog_header". ;) Please try this instead: [code]add_action('pagelines_before_maincontent','blog_heading'); function blog_heading(){ if ( is_home() ){ echo "

News

"; } } [/code]

Share this post


Link to post
Share on other sites
ringo1
Hey Kate, between the two of you that got it. : ) Super awesome, thanks guys! I'm trying to style so it has a little space from the top and the edge of the page. I tried .page-id-833.h1, h2, h3, h4, h5, h6 { font-weight: normal; line-height: 1.2em; margin: 10px 0 0 20px; padding: 0; } in the custom code area but it seems to only happen universally and not page specific.... any ideas? http://www.onet-it.com/?page_id=833

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×