That depends on what your trying to do.
If you want to get the page content in another template or functions file and your home page is a page that you created in the dashboard and set as the static front page
you can use get_page_by_path
function like this:
get_page_by_path('the_path_of_the_page'); // Usually will be 'home'
Or if you want to use get_pages
you can do the following:
<?php $args = array(
'post_type' => 'page',
'post_status' => 'publish',
'post_name' => 'the_slug_of_the_page' // This also will likely be 'home' for the home page'
);
$home = get_pages($args);
?>
See get_page_by_path in the Codex.
Related Posts:
- Change admin startpage to Pages-page?
- Modify theme to get page excerpts on front page
- Is it possible to set a page template on a dynamic home page (articles list)?
- Can’t change parent page
- Redirect “Sorry, you are not allowed to access this page.” to Home
- How to display thumbnail and excerpt of a page on homepage?
- Custom /page/2/ template (different from index.php)
- how to get specific page content
- Is it possible to have a landing page based on the visitors location?
- Making a wordpress page the index on the site?
- How to change only the home page / front page url on wordpress
- is_home() returns TRUE on page template
- Location-Based Pages displaying results near customer
- Page displays content from different query?
- Site url is not showing the home page
- Updated WordPress, now getting errors on site
- My custom template page not loading content inside it?
- Add a static page that links to homepage
- Can I change the “Home” text in the menu?
- Parent page shows no child content
- How do I evaluate a get_posts array with is_page?
- Displaying posts on homepage – Template Page
- creating single page with 2 columns while theme is 3 column
- Limit the amount of main pages
- On the list of Pages, clicking to Edit a particular page redirects to the list of trash
- Different template parts when on different pages
- How to get an array of pages ID by some page’s slug and all its children pages in get_posts() function?
- URL redirect to home page issue in word press site
- How to change default home link title?
- Static Home Page resets to Front Page
- Why my home page doesnt work?
- How to detect if some page template has been selected
- pagination does not work with query_posts. Help! [duplicate]
- Use get_posts() with ‘post’ and ‘page’ queries at the same time?
- How to display text of a page in home or custom page?
- How to set a default page for load first time?
- How do I create a page that displays the homepage?
- For some reason my posts are not showing up on my front page [closed]
- Get the content of a specific page (by ID)
- How to give paged links custom title?
- Show Default Editor on Blog Page ( Administration Panel )
- Create pages automatically if they don’t exist
- Can I display submenus in groups, using wp_list_pages?
- Can I display the widget admin in the page admin?
- Internal Links to Pages in PHP?
- Restrict acceess of a page in backend
- How to make certain page templates visible to admin only
- Editing Pages that Have Already Been Published
- The entire content of my WordPress page has disappeared
- What is the proper way to get contents of a page?
- Getting child content
- Can I include Javascript/jQuery in a page?
- Adminbar Missing “Edit Page”
- conditional tags- how to use with shortcodes
- Having wordpress page accesss issue under sub-directory
- How to make my category archive behave like a page
- Add external css to Contact Page
- how to edit source code of specific page in wordpress?
- Where can i make an html change to a specific page [closed]
- WordPress backend:How to hide some specific pages under Pages–>All Pages
- Different header for each page in child theme of twenty thirteen
- Change a Page’s Header Image
- Dynamic href link to Contact Page
- Restrict the list of parent pages to only those which are created by current user
- Use content from one page in another template
- Is there a way to schedule changes to a page?
- Is it possible to change slugs’ default behaviour?
- List child pages within page template
- Option for pages order in backend
- Return subpages of an author if the parent page was published by an other author
- append one page content into another
- on page creation few inline style properties gets removed
- way to make all pages with certain tags public?
- Page not appearing under its Parent
- register_rest_field only for specific page
- Update Pages ONLY from Stage to Live (not products)
- Change page width in refined magazine/mag and news theme
- How do you run code on a specific page without missing the init hook?
- Every change made by “Author” role is going to “pending review”
- if is_page() is not working with wp_redirect
- Display meta data attribute in user profile
- Assign Parent Page – Now 404 Error
- Create multiple custom HTML pages
- WordPress displays widgets out of whack
- Add homepage to the list of pages in the Footer Widget
- Customise the_title in admin area
- Add pagination to search.php page
- How to turn post into pages and via versa?
- How do I get my page “About” to show up on my WordPress site?
- Featured Image not displaying in a page
- Pulling posts tagged with similar title name
- Filter posts by author selected in page
- Temporary download page or restrict static download page based on how the user got to the page?
- List Parent page with sub pages
- simple category search form returns full text – but I need excerpts
- not empty categories don’t show in menu [closed]
- I want Page titles and excerpts to show up on home.php in certain order
- Order pages by date
- wordpress user profile page
- In WP, Google map error initMap is not a function [closed]