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
- Site Library issue
- ‘x’ Converted to html code in example: 5×10
- Proper procedure for wp_insert_post?
- confused about wp_list_pages() function – how to display selected top pages with all their subpages
- Conflict between wp_list_pages and get_posts – list pages not displaying
- Read more on pages WordPress
- Three menus – parent / child / sibling
- Automatically add images to a menu
- Bad pages redirection
- When will body has class “page-id-0”
- Disable ADD PDF media button on rich text editor
- Page access only from a specific page in wordpress website
- invalid argument in foreach when trying to list custom post types in archive.php
- Can I schedule my site to launch at a set time and date?
- Change page name in admin list
- How to show ‘tags’ in ‘WordPress Pages’ [not Posts]
- Can I “protect” a page with a form asking for an email address?
- How can I change “page” (as in foobar.com/page/5) to another word?
- Stop Expansion of Top Level Menu in the WordPress Admin Sidebar
- Page titles for internal classification of landing pages
- Show some menu sub items as dropdown under a menu item
- Published pages missing
- Restrict the list of parent pages to only those which are created by current user
- Getting ACF Field in Page – From the Footer
- Show FormCraft form on page open [closed]
- how can i remove page title on desktop view
- Implement a Walker with custom object rather than WordPress database object
- Use same page-mypage.php template for several pages
- How to create “custom page types” with different custom fields in them?
- How can I send an email when someone uses the HTML download Attribute?
- If I use a static page-slug.php for a page, is the database still queried?
- How Do I Find & Remove H1 From Site-Title-Wrapper? [closed]
- How to disable delete option for a specific page? [closed]
- determine whether content is of type Page or a Post and display accordingly
- Check if the child page has sibling pages, and bookmark current page
- How to create custom search page
- How do I quickly hide a hierarchy of pages from search engines and external users?
- Add (grand)child pages automatically to nav menu
- Deleted a user with administrator rights. Now all the data/content/images are lost. how to recover them back
- How to store archived copies of a WordPress site
- how avoid the link of the current post in the menu in the sidebar?
- Function to incorporate an option in each Page
- Changes in WordPress taking 48hrs to reflect [closed]
- Use content from one page in another template
- pre-existing data, and entities
- Disable parent in wp_list_pages – WordPress
- Why last blog post excerpt is shown instead of meta description? [closed]
- Prevent non-admin to add/create new pages
- Rewrite to load homepage for a different url
- logout redirect only from admin page
- Is there a way to schedule changes to a page?
- Remove_filter (‘the_content’, ‘wpautop’) only pages
- Avoid pages losing template association on site re-deploy
- Weebly Migration to WordPress [closed]
- How do you implement a page template automatically being applied to a page?
- Page appears after de registering from menu
- Need to create a custom page on a website