WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Pricing Table] Gray template breaks

[Plugin: Pricing Table] Gray template breaks

  • taewoo
    Participant

    @taewoo

    it breaks in WP 3.4.1… because the inline css are getting newlined by wordpress.

    Here’s a fix/hack

    1. open tpls/price_table-gray.php

    2. put CSS into PHP variable.. then echo by removing newline with preg_replace, like so:

    `
    <?php
    $data = get_post_meta($pid, ‘pricing_table_opt’,true);
    $featured= get_post_meta($pid, ‘pricing_table_opt_feature’,true);

    $css = <<<CSS

    #pricing-table {
    margin: 100px auto 50px auto;
    text-align: center;
    width: 892px; /* total computed width = 222 x 3 + 226 */
    }

    ….
    …..

    CSS;

    ?>

    <?php echo “<style>”. preg_replace(“/\n/”, “”, $css).”</style>”; ?>

    Voila

    http://wordpress.org/extend/plugins/pricing-table/

Viewing 2 replies - 1 through 2 (of 2 total)
  • This is a little too advanced for me, can you please help? The grey template seems to be broken in WP 3.5 as well.

    Thanks!

    feliciepr7
    Member

    @feliciepr7

    The tables dont show up for me and then I am not able to edit it. I think is not compatible yet with 3.5.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Pricing Table] Gray template breaks’ is closed to new replies.