Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Lewis Rosenthal

    (@lewisr)

    I assume you mean custom fields in the header of each page?

    Presently, the only way to add those is to modify the code. If you can give me a use case, I’ll see about adding it to my to-do list.

    Cheers

    Thread Starter LS

    (@lsterling03)

    I mean the custom fields that I have set up in the body of a custom page template.

    So for example, I’d have <?php the_content(); ?> and then I have some custom fields below that like <?php the_field('phone_number') ?> etc….

    I tried manually adding this to the plugin code and it seemed to work:

    $phone = get_post_meta( $post->ID, 'phone_number', true );
    $html .= '<p>'.$phone.'</p>';

    Is there a way to modify the code without it getting overwritten the next time the plugin is updated?

    Also… is there a way to resize the featured image output? It’s currently large and centered. It doesn’t respond to my attempts to add style=”float:left;width:25%” etc…

    Thank you.

    Plugin Author Lewis Rosenthal

    (@lewisr)

    Indeed, the same issue. There is currently no way to specify that in the plugin configuration, and the next update will remove your customization.

    I’m happy to add the functionality, though, as long as we can set it up to be generic (i.e., add a dropdown list in the admin area to include selected custom fields). Right now, that part of the admin area is a bit untidy, with large rows for such options and only standard things for the header.

    Resize featured image:

    There is a test fix for the featured image alignment/sizing issue in the trunk (see here), however, it is not without issues (yet).

    To manually adjust the code for your preferred styling (which would then apply to all featured images), see lines 370-388 of wp-post-to-pdf-enhanced.php .

    Adding custom css is another issue currently under development. As this is an all-volunteer thing for me, I can’t make any promises as to when such things will be fully implemented, but I’ll try to add & fix things in the order requested (and the order of difficulty!). 😉

    Cheers

    Thread Starter LS

    (@lsterling03)

    Thanks Lewis. I appreciate the responses. I figured out the featured image sizing issue (sorry, I missed that option in the admin panel). However, I still can’t get it to un-center. I tried editing line 370-388 to this:

    $html .= '<div style="float:left;text-align:left">' . get_the_post_thumbnail($post->ID) . '</div>';

    But it is not affecting the position at all. Do you know why that is?

    I appreciate that this is a volunteer job, so thank you for taking the time to help.

    Thread Starter LS

    (@lsterling03)

    I’ve moved to another plugin that does what I want out of the box, but your plugin looks promising and I hope to return to it once you’ve updated it with some of these feature request. Thanks again for your help!

    Plugin Author Lewis Rosenthal

    (@lewisr)

    You bet!

    Check back, as things are indeed in the works as time permits. 😉

    Cheers

    Lewis

    Hi lsterling03.
    Please tell me where you entered this code?

    $phone = get_post_meta( $post->ID, 'phone_number', true );
    $html .= '<p>'.$phone.'</p>';

    File and line?

    Thank you so much !!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Custom Fields’ is closed to new replies.