-1

I'm trying to move the title of my page to within my content

I have 2 columns at the moment and so my page layout is

TITLE COLUMN 1 | COLUMN 2

however I would like to have

TITLE in Column 1 | Column 2

how do I move the page/post title and put it within the content without doing it manually on each page?

I've checked the functions.php page and the content.php page but I'm unsure how to get it to add it to the content of the pages without typing it in on every page and formatting it etc...

2
  • Hi - you'll need to post some of your actual code in order for us to help you here. can you post just the lines of code which are dealing with the title-printing?
    – Taryn East
    Mar 14, 2014 at 3:15
  • Not a good start to posting on SO. We can't help you without seeing what coding issue you are trying to resolve.
    – Trent
    Mar 14, 2014 at 4:00

1 Answer 1

2

you need to register short code like bellow.

<?php
function title_in_content($attr) {
   return get_the_title();
}
add_shortcode("title_in_content", "title_in_content");
?>

than you can use tag in your content [title_in_content] it will replace the post title.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.