I’ve got it fixed:
I needed to add the wp-load file that contains all the WP-functions
include('../../../../../wp-load.php');
global $post;
$id = $_GET['id'];
$content_post = get_post($id);
$content = $content_post->post_content;
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
Now the content loads in the PDF
Related Posts:
- How can I get an XML export of my 1K+ posts WordPress instance?
- Export User Info to CSV from Front End
- Export all post from database to JSON only when the database gets updated
- How can I export post data in xml format?
- automatic PDF invoice with FPDF in PHP (creating Plugin)
- Export WordPress Table to CSV from page
- Attaching a pdf to Contact Form 7 e-mail via functions.php [closed]
- How do you use WP slugs for PDF files / media?
- PDF file randomly breaks upon upload
- How to retrieve current wordpress profile page URL?
- PhantomJS with wordpress
- Custom CSV exporter – Cannot modify header information – headers
- Attach and retrive multiple pdf files to post or page
- Export WordPress User Meta to CSV/Excel
- How can I export data without using any import/export plugin
- How to export database correctly for local to online
- Search through documents folder
- How To: Simple domPDF Example
- How can I send an email using PHP?
- Should I use spl_autoload_register() in my plugin?
- List of all theme customizer control types?
- Shortcode putting html such as
- Load post content into iframe
- Editor role cannot save custom theme options
- Installing wp3.2.1 on IIS; getting empty sessions
- WordPress widget in custom theme
- functions.php not adding css to website?
- Why is my get_post_meta always empty
- Geocoding an Exploded Custom Field Array
- Count Title and Post Characters
- fetch_feed: retrieve entries in the appearing order, not chronologically
- HTML table from shortcode with multiple parameters
- Programmatically create menu with custom link
- Trigger Woocommerce New User Email
- get_users(…) only returns one user
- get_page_by_title with an apostrophe in variable
- Add a Second Menu to a theme that only support 1 menu
- Dynamic Stylesheet loads but doesn’t finish
- How to show single category archive
- Dynamic content based on a URL parameter
- Replace shortcode in substring
- Detecting classes, adding widgets, and adding divs in with a Nav Walker
- Include a PHP file inside an array
- How to use html inside a functions.php code?
- Nested “do” and “add” Actions is possible?
- Deprecated: Function create_function() is deprecated [closed]
- displaying content that includes shortcodes within an echo
- Update a buggy installation
- Trying to prepend a Hashtag symbol to the_tags links [closed]
- How do I define a lookup table that will work across all PHP elements of the template?
- trouble with page_id & highlighting current page
- How to use two meta_compare in an array?
- How to hook a logout funtion for specific usr role in wordpress?
- Custom post type category not displaying category ID
- Advice on creating a WP Archive Template with Custom Taxonomy (get_term_meta)
- create front-end users post list by specific category
- wrap a span tag around author’s post count
- How to get the filename from file system and create a download link?
- PHP getting error when trying to access WP-Admin Dashboard
- Foreach implode issue
- Error display post thumbnails for previous and next post
- Dynamically added custom fields not displayed on WooCommerce email notifications
- End of blog roll or start of blog roll, _post_link = false / no link
- How to Remove Theme Style CSS inside Custom Plugin?
- get different meta-data of a complicated query at the same time
- Please help! I have a problem with getting wordpress databas
- Get only relevant sub-category of category “Genre” that applies to current product only
- How to escape echo for input tag?
- 400 bad request admin-ajax file upload
- Custom Loop.php having a loop inside a loop
- Add Shortcode to ::before class
- Warning: count(): syntax problem of the count () function
- Reload page with a different shortcode when a user selects from a dropdown
- How to display custom seo title before the loop?
- WooCommerce get products based on the taxonomy
- Woocommerce Add custom “Add to cart button” in single page with tags
- Displaying child taxonomy before parent
- How do I fetch a data from an external database into my wordpress homepage
- Add div after every 4 posts then every 2 posts for a responsive loop
- Update same content in multiple posts at once?
- Different home page for logged off users
- Widget Update problems using a for loop
- Non-static method error when trying to use class in widgets
- Send data from plugin to external database
- Changes in header.php not reflecting
- WP Admin Bar – Get current theme name as custom menu title
- Newly published content gives 404 on wordpress
- Show custom default avatar instead of gravatar
- the_post_thumbnail unless video id is added
- ajax form function error
- Simple Probléme in wordpress
- Advanced Custom Fields Show PHP in Text Areas
- New to WordPress & Freelancing [closed]
- Add a “Next Post” & “Previous Post” styled button manually to a post
- How to store the_post_thumbnail() value in a variable
- Edit Error Page style
- How to sort wordpress posts by selecting a year from a drop down?
- WooCommerce Checkout Cart [closed]
- How can I use AJAX in child theme template?
- WordPress taxonomy and terms question