• Resolved wimadmin

    (@wimadmin)


    I’m trying to echo the post title in the “Print Page Top HTML” but nothing is being echoed.

    Here is the code I’m using.

    <table width="100%" style="font-family: Oswald; font-size: 9pt; color: #000000;"><tr>
                    <td width="30%" ><img src="https://i.imgur.com/pjDhHtR.jpg" style="vertical-align:top; float:left"></td>
    				<td width="70%" style="vertical-align: text-bottom; font-size: 14pt; font-weight: bold; color: #000000; text-align: center; vertical-align: text-bottom;"><?php echo $post_title; ?></td>

    https://www.ads-software.com/plugins/print-o-matic/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Baden

    (@baden03)

    Thread Starter wimadmin

    (@wimadmin)

    Fast reply!

    Thanks!

    Thread Starter wimadmin

    (@wimadmin)

    Strange. I’ve tried the following and still cannot get the title to echo in the Top HTML.

    1. <?php echo get_the_title( $post_id ); ?>
    2. <?php echo do_shortcode(‘[page_title]’); ?>
    a. Created function to retrieve post title. Tested and confirmed shortcode works in post content.

    Seems like the PHP is not being parsed. Is there a file that stores the custom HTML? I’m wondering if the plugin generates an .html file instead of .php.

    Thread Starter wimadmin

    (@wimadmin)

    PS. LOVE the comments “//rot in hell IE”

    Plugin Author Baden

    (@baden03)

    ok, so you need to divide this into to issues.

    1. echoing the post title.
    Where exactly are you trying to insert this? Inside or outside the loop?
    is $post_id defined?

    2. once you can output the post title on the page you simply need to wrap it in an element and set this element on the display page as display:none. The element should not include this css on the print page. Now you have the title hidden on the display page, and showing on the print page.

    Without a link to your site, we can not be of much more help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Unable to echo php variable in Top HTML’ is closed to new replies.