Support » Developing with WordPress » How to develop on a new independant page?

  • Resolved vmackey1



    I am a new WP developer. So far, I have been coding on page.php. But I’d like to work on an independent page. So I created a php file and placed it on the root folder of my WP installation. and placed this simple code to display a post’s title.

    echo "Get title: ";
    echo get_the_title( 6 ); 

    It displayed the text “Get title:” but not the post title I was trying to get. The code worked without issue when placed on page.php.

    Can you explain to me what I am doing wrong? Is it possible to create an independent page this way? If yes, how?

    Thank you very much.

    • This topic was modified 2 months ago by vmackey1.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.