• Resolved vladsitaru

    (@vladsitaru)


    Hello Tobias,

    I seek help with a shortcode I am using to play audio files. It seems to have issues when trying to align the column centrally & vertically.

    At the moment I am using the following CSS which works for all but the 4th column:

    .tablepress-id-1 .column-1,
    .tablepress-id-1 .column-2,
    .tablepress-id-1 .column-4,
    .tablepress-id-1 .column-5 {
    text-align: center;
    }

    .tablepress-id-1 .column-1,
    .tablepress-id-1 .column-2,
    .tablepress-id-1 .column-3,
    .tablepress-id-1 .column-4,
    .tablepress-id-1 .column-5 {
    vertical-align: middle;
    }

    The plugin for the audio “play” button I use is Podcast Player Pro:
    https://vedathemes.com/blog/help/podcast-player-pro/

    Would this be a problem related to the plugin, or could something be done to fix it?

    Regards,
    Vlad

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    To make that Shortcode work more reliably, you’ll probably have to turn off TablePress’ output caching. You can do that by using the extended Shortcode

    [table id=1 cache_table_output=false /]
    

    on this page.

    As for the centering, it will indeed be the best to contact the support team of that Podcasy Player Pro plugin, as they should know best what CSS to use. You could then of course add that CSS code to the TablePress “Custom CSS” text field.

    Regards,
    Tobias

    Thread Starter vladsitaru

    (@vladsitaru)

    Hello Tobias,

    I got in touch with the Podcast Player Pro team and they provided the below CSS code that does the job:

    .tablepress .pp-podcast { width: 35px !important; margin: 0 auto; }

    There were also issues at one point with the Podcast Player not appearing for users not logged into wordpress. It seems Tablepress is caching HTML if you are not logged in. Here was the solution for this one, should it ever be of help for someone.

    add_filter( ‘tablepress_table_render_options’, function( $opt ) {
    $opt[‘cache_table_output’] = false;
    return $opt;
    } );

    Thank you for your help!
    Vlad

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    nice! Yes, that CSS code looks reasonable. ??

    As for the other code: This will work, too, but it has the drawback that the caching will be turned off for all tables, regardless of whether they have the other Shortcode in them or not. Therefore, I don’t fully recommend that code approach, but instead suggest to use the modified Shortcode from my previous reply. That will then only affect that particular table.

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problematic Shortcode’ is closed to new replies.