In your example.php
file add this line at the top, this will enable all wordpress functions such as $wpdb
, get_header();
etc.
<?php require_once('LINK-TO-DIRECTORY/wp-blog-header.php'); ?>
Recommended reading – Codex – Integrating WordPress with Your Website
Related Posts:
- Create pages automatically if they don’t exist
- Editing Complex Pages in Visual Mode
- Can I display submenus in groups, using wp_list_pages?
- Change admin startpage to Pages-page?
- Different fields in My Profile page depending on user role
- What’s the most minimal way in which a page can be hooked into WP?
- Associate Page with User
- Static files or dynamic WP pages for “static content”?
- CMS: Making complex pages editable by the end user
- Remove specific page/post from feed
- Custom page template not working
- Overriding the currently selected menu item
- How can I automatically add child pages to pages in a WP menu?
- Create custom page and add it in nav menu by code
- How to detect if is_404() or is_page() or etc…? [closed]
- Redirect page to default subpage
- How can I use “getarchives_where” to get monthly archives for static pages?
- disable Tab post on nav-menus page (Admin)
- Add a static page that links to homepage
- Create page template with some static contents
- Can I change the “Home” text in the menu?
- Parent page shows no child content
- Insert menu with a custom walker into page / post body using shortcode?
- I can’t add more pages to menu – menu delete pages
- Get rid of “comment” field on non-blog pages [duplicate]
- How do you set the default page in WordPress?
- Check if page has subpages
- wp_nav_menu: output featured image of each page listing
- Check if has pages?
- Pages that don’t look like blog posts?
- Problems in creating a static site with WordPress
- After creating a new page, filling the page with structure
- Problem with deleting a “Page”
- Creating and populating custom nav menu (menu-item-position not working)
- How do I make just one of my pages a Blog Page?
- pagination does not work with query_posts. Help! [duplicate]
- How to remove title (home) from static page skeleton template
- Multiple WordPress Pages
- Load new Posts on Scroll on Page
- Default pages to be unpublished – possible?
- How to remove the trackback and pingback text on the bottom of my pages?
- How to display text of a page in home or custom page?
- Create a plugin to create a new page in wordpress for each time a record is added into the database
- How do I convert a page’s title to lower case?
- page title, parent tilte and grand parent title
- Manual excerpts for pages not working on Search
- Limit the number of pages created by the paging
- One page – Multiple parents?
- How to re-order pages en-masse
- how to get specific page content
- Copyright messages for a particular set of pages
- is_page condition not working
- How WordPress manages nested dropdown?
- View Private Published Page with URL Code (no login required)
- Blank Pages with # URL & Google
- Add google org chart to wordpress page
- Moved WP from example.com/blog to example.com, cannot add pages now
- Adding buttons to Add New Post and Add New Page
- How to add pagination to a single wordpress page with lot of text
- Static posts page with home.php
- How to have a separate page? What should be the link to that page?
- Add data-id attribute to child page links
- 404 Page not found
- Styling Previous/Next Pages differently from Index
- When will body has class “page-id-0”
- How do I evaluate a get_posts array with is_page?
- How to create custom layouts and static pages in themes for clients
- Theme for subcategories
- Displaying posts on homepage – Template Page
- Need 404 behaviour for blank parent page
- custom query for both category and pages using global $wpdb;
- advanced paging in wordpress
- How to output all taxonomy links from a custom post type in a menu?
- $page = get_page_by_title CONTAINS
- Exclude child pages args array
- Author page like wordpress answers
- How do I disable the built-in editor and automatically configure the properties of new pages?
- WordPress custom menu can’t show 3. level submenu
- Block to Popup Page, on demand?
- Add producthunt badge to wordpress menu
- Go back to the exact post page number
- Stop playing music (rev slider) when user opens new tab
- how can i display children of my parent page in one of the children page (wordpress)
- How to select what posts goes into which custom page template?
- Parent menu item does not display posts when I add the sub-items
- Displaying all pages which comes under a category id
- WordPress redirects to login page when I enter url.com/index.php
- I lost the link to my posts in my menu bar
- Post id(login page) not found
- Restrict my pages from public
- different single.php for different page templates
- Passing variables through a href link from one page to another page
- Adding Pages to Menus – No Page Hierarchy in Backend [duplicate]
- How does WP knows which template to use for a page
- Problems with draft website pages
- How do I count the number of pages a user has seen on my site, and force them to log in after a certain amount
- How to customize the author page in wordpress?
- User profile in front-end
- custom css in one page
- Why is a page shown with ‘hidden’ next to the name in the list of pages if the page is set to public?