Title: Before Content
Last modified: August 24, 2017

---

# Before Content

 *  Resolved [Morris Gilles](https://wordpress.org/support/users/morris-gilles/)
 * (@morris-gilles)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/before-content/)
 * Hi there,
 * first of all, thanks for your amazing plugin!!!
 * I am experiencing some trouble implementing the “before content” filter. Basically,
   if you open a PDF on my website ([https://easteuropeanfilmbulletin.com/dancer-in-the-dark/?pdf=120](https://easteuropeanfilmbulletin.com/dancer-in-the-dark/?pdf=120)),
   it will show the title of the PDFed post on ALL PDF pages. I want to change this
   to have it show only on the FIRST page of the PDF. I have two questions:
 * 1. Can I have the title show only on the first page by using the “before content”
   filter?
    2. If so, could you roughly tell me how I can do this? I saw that you
   have a documentation regarding your filters, but I don’t know where to enter 
   them… (I have experience working with php on my website, but haven’t ever added
   filters or altered plugins, so I don’t know which php files I need to add/alter
   to make the title disappear on all but the first page of the PDF.)
 * Thanks in advance!!!!!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fbefore-content%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Morris Gilles](https://wordpress.org/support/users/morris-gilles/)
 * (@morris-gilles)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/before-content/#post-9437985)
 * I have found an inelegant php solution (see PDF link above), would still appreciate
   general advice on the possibility of working with filters (as mentioned, I just
   want to know WHERE I have to add the filters). Thanks!
 *  Plugin Author [dinamiko](https://wordpress.org/support/users/dinamiko/)
 * (@dinamiko)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/before-content/#post-9455389)
 * Hi Morris Gilles,
 * you can add the filter in your theme (or child theme) functions.php
 * to show the post title before the content you can use something like this:
 *     ```
       function custom_dkpdf_before_content() {
          $output = '<h1>'.get_the_title().'</h1>';
          return $output;
       }
       add_filter( 'dkpdf_before_content', 'custom_dkpdf_before_content' );
       ```
   
 * Thanks,
    Emili
    -  This reply was modified 8 years, 9 months ago by [dinamiko](https://wordpress.org/support/users/dinamiko/).
 *  Thread Starter [Morris Gilles](https://wordpress.org/support/users/morris-gilles/)
 * (@morris-gilles)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/before-content/#post-9456466)
 * Awesome, thanks Emili.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Before Content’ is closed to new replies.

 * ![](https://ps.w.org/dk-pdf/assets/icon-256x256.png?rev=3396282)
 * [DK PDF - WordPress PDF Generator](https://wordpress.org/plugins/dk-pdf/)
 * [Support Threads](https://wordpress.org/support/plugin/dk-pdf/)
 * [Active Topics](https://wordpress.org/support/plugin/dk-pdf/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dk-pdf/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dk-pdf/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Morris Gilles](https://wordpress.org/support/users/morris-gilles/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/before-content/#post-9456466)
 * Status: resolved