JohnTendik / jtrt-tables

A Wordpress plugin to help users create responsive tables without having to read or write code.
GNU General Public License v2.0
22 stars 6 forks source link

help #91

Closed muhacolee4 closed 5 years ago

muhacolee4 commented 5 years ago

please how do i display the table using php instead of short because i want display table based on condition , help need asap

JohnTendik commented 5 years ago

Hey,

You can do

<?php

// your conditional code
if (whatever) {
  do_shortcode('[jtrt_tables id="something"]');
}

?>
muhacolee4 commented 5 years ago

Let try this again because I tried pay a variable to the ID before and was having issue

Something

$value=4; And then passing value into the php eg Id="$value" sorry for the way I type, I am on phone now

On Sat, Aug 10, 2019, 5:46 PM John Tendik notifications@github.com wrote:

Hey,

You can do

<?php

// your conditional code if (whatever) { do_shortcode('[jtrt_tables id="something"]'); }

?>

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JohnTendik/jtrt-tables/issues/91?email_source=notifications&email_token=AG7XFNE754U5MLJQBJWPGR3QD3WE7A5CNFSM4IKZORXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4ARBUQ#issuecomment-520163538, or mute the thread https://github.com/notifications/unsubscribe-auth/AG7XFNHFHFUHMZS3OUI4TDTQD3WE7ANCNFSM4IKZORXA .

JohnTendik commented 5 years ago

then you have to do

do_shortcode("[jtrt_tables id='$value']");

the double quote need to be on the outside and single quotes in the inside. PHP variables are only parsed inside double quotes but if you start off as single quotes its not going to work (at least thats my guess, I havent tried it)

or

do_shortcode('[jtrt_tables id=" ' . $value . ' "]');

muhacolee4 commented 5 years ago

It work thanks alot bro,I would like to be your friend on Whatsapp if you don't because I hope to be u or better than I someday

On Aug 10, 2019 5:59 PM, "John Tendik" notifications@github.com wrote:

then you have to do

do_shortcode("[jtrt_tables id='$value']");

the double quote need to be on the outside and single quotes in the inside. PHP variables are only parsed inside double quotes but if you start off as single quotes its not going to work (at least thats my guess, I havent tried it)

or

do_shortcode('[jtrt_tables id=" ' . $value . ' "]');

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JohnTendik/jtrt-tables/issues/91?email_source=notifications&email_token=AG7XFNBDZZETBBIETDNTBG3QD3XYDA5CNFSM4IKZORXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4ARJFI#issuecomment-520164501, or mute the thread https://github.com/notifications/unsubscribe-auth/AG7XFNAICF43PITYLMCJOBDQD3XYDANCNFSM4IKZORXA .

muhacolee4 commented 5 years ago

Bro, I need another urgent help, I am really sorry for disturbing you, please I need to all rows with a field e.g absent and also filter the field present and then display using the shortcode, from your table, I could only filter column by number , is it possible to filter by content like I said filter the rows that are absent and display it

On Sun, Aug 11, 2019, 12:40 PM muhammed abba sule muhacolee4@gmail.com wrote:

It work thanks alot bro,I would like to be your friend on Whatsapp if you don't because I hope to be u or better than I someday

On Aug 10, 2019 5:59 PM, "John Tendik" notifications@github.com wrote:

then you have to do

do_shortcode("[jtrt_tables id='$value']");

the double quote need to be on the outside and single quotes in the inside. PHP variables are only parsed inside double quotes but if you start off as single quotes its not going to work (at least thats my guess, I havent tried it)

or

do_shortcode('[jtrt_tables id=" ' . $value . ' "]');

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JohnTendik/jtrt-tables/issues/91?email_source=notifications&email_token=AG7XFNBDZZETBBIETDNTBG3QD3XYDA5CNFSM4IKZORXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4ARJFI#issuecomment-520164501, or mute the thread https://github.com/notifications/unsubscribe-auth/AG7XFNAICF43PITYLMCJOBDQD3XYDANCNFSM4IKZORXA .

JohnTendik commented 5 years ago

No, filter by content is not a feature at this.

You could however use javascript after page load to filter the table..

muhacolee4 commented 5 years ago

Ok thanks bro

On Sun, Aug 11, 2019, 6:54 PM John Tendik notifications@github.com wrote:

Closed #91 https://github.com/JohnTendik/jtrt-tables/issues/91.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JohnTendik/jtrt-tables/issues/91?email_source=notifications&email_token=AG7XFNAFPLP5E443F64ZTXDQEBG5FA5CNFSM4IKZORXKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOS7VM2WQ#event-2548747610, or mute the thread https://github.com/notifications/unsubscribe-auth/AG7XFNFATQJ32POHSTCDF4LQEBG5FANCNFSM4IKZORXA .