• Resolved Clickadelic

    (@clickadelic)


    Hi there,

    first of all: awesome idea, awesome approach – should make life a lot easier.

    I’m working on a product page for alloy wheels in combination with Advanced Custom Fields and would like to use your plugin to display all the data of an alloy wheel e.g:

    Dimensions: PCD’s RRP
    17″ Inch 5 x 110/112/114 119,-€

    etc..

    Backend implementation does work fine, unfortunately the front end code doesn’t find the table.

    At the beginning of the page, I’m getting the custom post type via:

    $custom_args = array(
        'post_type' => 'oxxo_product_box',
        'posts_per_page' => 1
    );
    
    $loop = new WP_Query( $custom_args );
    while ( $loop->have_posts() ) : $loop->the_post();
    
    $html = '';
    $html .= '<div class="single-product">';
    $html .= '<h1> '. get_the_title() . '</h1>';
    etc...

    I’ve tried all three different methods of showing the table like:

    1)

    $tablepress_id = get_field( 'data_table' );
    echo do_shortcode( '[table id="'.$tablepress_id.'"]' );

    2)

    $tablepress_id = get_field( 'data_table' );
    $args = array(
    'id' => $tablepress_id,
    );
    
    if ( function_exists( 'tablepress_print_table' ) ) {
      tablepress_print_table( $args );
    }

    3)

    the_field( 'data_table' );

    Any Ideas?

    You can see the issue here:

    First [table not found] is via Loop & PHP code
    Second Table is handish entered “1” as the table ID.

    http://beta.oxxo-wheels.de/en/product/bestla/

    Otherwise I’m scr***d since it will make my project a lot harder 🙁

    Thanks for any hints and ideas how to solve this!

    Toby

    https://wordpress.org/plugins/acf-tablepress/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    thanks for your post, and sorry for the trouble.

    I just checked your link and I can see the same table twice, so that I assume that you got it working?

    Regards,
    Tobias

    Thread Starter Clickadelic

    (@clickadelic)

    Hi Tobias,

    Thank you for putting your attention to this post.

    I’m confused.. I didn’t work – I s***r..

    Now, reading your answer it does work.. omg?

    Sorry, for the confusion – I need to check that out.. this is insane..
    I have tried to fix it the entire morning, now it work’s without doing anything to it?

    Again, sorry this is so weird..
    Regards,
    Tobias

    😀

    Plugin Contributor pwtyler

    (@pwtyler)

    Hi Tobias—

    Sorry you’re having trouble! Looks like maybe you were able to resolve this (although I know how annoying those “I don’t know how I did this” fixes can be).

    My first guess would have been that you might have been returning the HTML instead of just the table ID, but the fact that the_field( 'data_table' ); wasn’t working either sounds like it could be something deeper.

    If you still need help and can set us up as an Administrator and/or provide FTP access, we’d be happy to take a look! You can email us at support@tylerdigital.com.

    Best,
    Phil

    Thread Starter Clickadelic

    (@clickadelic)

    Well, first of all guys:

    Please don’t apologize – you are putting a lot of work into this, and it’s free so I don’t dare to complain about it. I have to thank you for all the work you are investing.

    The issue:

    Since my project is a multilingual website, I have de-activated and activated a couple of plugins which have to do with i18n / language management (ACF & qTranslate e.g.), but still, I was not able to figure out where the error was coming from.

    Since my namesake Tobias had answered, it does work, I didn’t touch the code since then, it’s… weird.. however:

    Instead of investing my time into the “why” I should simply drop 5 Stars to your Plugin 🙂

    I have another question about mulitlingual stuff, but I will e-mail that to you.

    This topic can be closed or nailed on the wall of “I don’t know..”.

    Thank you, thank you!

    Best
    Tobias

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that everything is working!

    Best wishes,
    Tobias

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

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Table not showing’ is closed to new replies.