Title: Layout The Post Content via function
Last modified: September 1, 2016

---

# Layout The Post Content via function

 *  [Andrew](https://wordpress.org/support/users/flatmonk3y/)
 * (@flatmonk3y)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/layout-the-post-content-via-function/)
 * Hi There awesome plugin,
 * I am running into some difficulties. I am using this function `add_action( ‘wpo_wcpdf_after_item_meta’,‘
   wpo_wcpdf_show_product_description’, 10, 3 );
    function wpo_wcpdf_show_product_description(
   $template_type, $item, $order ) { global $wpo_wcpdf; printf(‘<div class=”product-
   description”>%s</div>’, $item[‘product’]->post->post_content ); }` to display
   the post content . How ever is there a way that i could design the layout of %
   s because everything is on one line. here is an example of my post_content. `'
   post_content' => " Range: $range</br>&nbsp;Width: $width&nbsp;</br>Length: $length&
   nbsp;</br>Fabric: $fabric&nbsp;</br>Style: $style&nbsp;</br>Lining: $lining&nbsp;
   </br>Opening: $opening&nbsp;</br>Voile: $voile&nbsp;</br>Track: $track&nbsp;</
   br>Rod: $rod&nbsp;</br>Pulley: $pulley",` Thanking you in advance
 * [https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/layout-the-post-content-via-function/#post-7479221)
 * How come the post content is with `</br>` and not `<br>` or `<br/>`? I’m guessing
   the `</br>` is not recognized by the PDF engine because the tag doesn’t exist
   officially (`<br>` is self-closing).
 * I recommend looking into why this faulty HTML got there in the first place – 
   if you can fix that it will also be formatted with actual line breaks.
 * Hope that helps!
    Ewout

Viewing 1 replies (of 1 total)

The topic ‘Layout The Post Content via function’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Ewout](https://wordpress.org/support/users/pomegranate/)
 * Last activity: [9 years, 12 months ago](https://wordpress.org/support/topic/layout-the-post-content-via-function/#post-7479221)
 * Status: not resolved