Title: use shortcode inside table single cell shortcode
Last modified: May 5, 2024

---

# use shortcode inside table single cell shortcode

 *  Resolved [sharsharshar](https://wordpress.org/support/users/sharsharshar/)
 * (@sharsharshar)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/use-shortcode-inside-table-single-cell-shortcode/)
 * how to use use shortcode inside table single cell shortcode
 * for example, i have a shortcode [post_title], that show the title
 * and i use this information in column_id_value
 * i type sth like this
 * [wpdatatable_cell table_id=”26″ column_key=”Course Name” column_id=”JUPAS Code”
   column_id_value= [post_title]]
 * but it doesnt work

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

 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/use-shortcode-inside-table-single-cell-shortcode/#post-17739370)
 * Hello,
   Can you please confirm is the value from this shortcode rendering properly/
   as expected in the cell of the source table back-end preview?– Can you confirm
   what is the Table type ( of the source table which the value is being pulled 
   from)?– Are you using our **Lite**(free) or **Premium **Plugin version?– If you
   can please show us more details how does the table render the value in the cell
   on back-end with a screenshot or a Video? ( we are not sure how you constructed
   the table exactly, etc)Just make sure not to show any sensitive data here since
   this is a Public Support forum.If you need to show any sensitive data from your
   Site, then we suggest to open a private ticket on our main Support platform.If
   that is the case, or if you use the Premium Plugin version, please open a ticket
   on our main Support platform here, and one of our Agents will respond as quickly
   as possible.
 * If you don’t have a licence (or if it expired), please open a [pre-purchase ticket](https://tmsplugins.ticksy.com/submit/#100010481)
   which doesn’t require a purchase code.
 * Premium products are not supported in these forums, as per [this comment](https://wordpress.org/support/topic/error-when-not-logged-into-wordpress-backend/#post-15050671)
   by WordPress.org moderators.
 * Thank you for understanding. 
 * Kind regards.
 *  Thread Starter [sharsharshar](https://wordpress.org/support/users/sharsharshar/)
 * (@sharsharshar)
 * [2 years ago](https://wordpress.org/support/topic/use-shortcode-inside-table-single-cell-shortcode/#post-17741172)
 * data table imported from excel
 * i use free version
 * ![](https://i0.wp.com/dsesource.com/wp-content/uploads/2024/05/Screenshot-2024-
   05-08-205029.png?ssl=1)
 * the fifth column is what i want to render
 * the second column is what i want to search to locate the answer. The first six
   characters of my post title is JSXXXX
 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [2 years ago](https://wordpress.org/support/topic/use-shortcode-inside-table-single-cell-shortcode/#post-17751097)
 * Hello again,
   Apologies for not catching your reply here earlier.Thank you for
   these details and the screenshot of the Table.Since you use the free version,
   this is then a ‘table linked from Excel file source’.And you are using our ‘second
   variant’ of the Single Cell Shortcode for dataTables.So, as we have shown in 
   the [Documentation](https://wpdatatables.com/documentation/table-features/single-cell-shortcode/),
   if you go for this format as :[wpdatatable_cell table_id=”1″ **column_key**=”
   column_name” **column_id**=”custom_id_column” **column_id_value**=”custom_id_column_value”]
   That means that the column_key will be the Column in which your cell you need
   to render is located.In this case, that is correct, you need a cell from ‘Course
   name’, right?Just make sure to check what is the ‘origin header name’, go in 
   the Column Display settings and use the origin header ( in case if you have a
   different display header name).Now, the ‘**column_id**‘. It is the name of the
   column that contains **unique values** (**origin header name\*** of the column)
   Then, the **column_id_value** – is the value from column_id column which tells
   the table which row to look for.So you need to give it a unique value in column_id_value
   to pinpoint which row from Column “Course Name” you need in your single cell 
   value.Let’s say if we wanted to pull cell value in your table from Column Course
   Name to be this row which has “Anthropology” ( and some special letters which
   I can not write due to language barier) showing on your screenshot, I will highlight
   it in my image :
 * ![](https://i0.wp.com/ticksy_attachments.s3.amazonaws.com/7287973655.png?ssl=
   1)
 * In this case, your Single Cell Shortcode will be :
   [wpdatatable_cell table_id
   =”26″ **column_key=”Course Name”** **column_id=”JUPAS Code”** **column_id_value
   =”JS4006″**]And that would pull up the “Anthropology” cell value in your Shortcode.
   Let us know if this points you in the right direction to solve the issue?If you
   still can’t solve it, can you show us a screenshot when you have the value/row
   you need showing in the table and how it looks;What is the value for that specific
   row in “JUPAS Code” and what is the value in “Course Name”?You can also send 
   us your source Excel file so we can make a table from it to show you an example
   how to pull the specific cell you need.
 *  Thread Starter [sharsharshar](https://wordpress.org/support/users/sharsharshar/)
 * (@sharsharshar)
 * [2 years ago](https://wordpress.org/support/topic/use-shortcode-inside-table-single-cell-shortcode/#post-17754075)
 * However, the JUPAS Code is another shortcode which is [post_title] in my post
   which grab a certain characters from the title of the post. In this way, it is
   easier for me to scale the content.
 * That’s why i type [wpdatatable_cell table_id=”26″ column_key=”Course Name” column_id
   =”JUPAS Code” column_id_value= [post_title]] at first
 * and my struggling point is that how to use shortcode inside a shortcode
 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [2 years ago](https://wordpress.org/support/topic/use-shortcode-inside-table-single-cell-shortcode/#post-17760840)
 * Hello again.
 * What you’re trying to achieve can be accomplished only with the use of [Filters](https://wpdatatables.com/documentation/information-for-developers/filters/)(
   hooks). Here’s how it can work:
 *     ```wp-block-code
       function filterColumnIDValue( $columnIDValue, $columnKey, $rowID, $columnID, $table_id){
           // For specific table id - in your case 26
           if ($table_id == 26) {
               // Filter for specific name of the column that contains unique values (origin header* of the column) - in your case 'JUPAS Code'
               if ($columnID == 'JUPAS Code') {
                   // Filter for specific column ( origin header* of the column)- in your case 'Course Name' if this is the orig header
                   if ($columnKey == 'Course Name') {
                       $columnIDValue = do_shortcode("[post_title]");
                   }
               }
           }
   
           return $columnIDValue;
       }
   
       add_filter('wpdatatables_cell_filter_column_id_value','filterColumnIDValue', 10, 5);
       ```
   
 * Please let us know if that helps.
 *  Thread Starter [sharsharshar](https://wordpress.org/support/users/sharsharshar/)
 * (@sharsharshar)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/use-shortcode-inside-table-single-cell-shortcode/#post-17848467)
 * Hello
 * it has been a long day.
 * After a month, I finally have time to deal with this thing again.
 * Can you please explain again what the code does?
 * Since i am no very good at coding
 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/use-shortcode-inside-table-single-cell-shortcode/#post-17864446)
 * Hello sharsharshar,
   Basically, we don’t have any built-in solution to achieve
   your use-case.
 * With our built-in ‘out of the box’ options for the Single Cell Shortcode, it 
   is not possible to use a ‘shortcode inside a shortcode’ as you described.
   You
   would need to insert the actual value from your cells as explained on our Documentation
   examples/tutorials and the initial example we gave.
 * You can suggest this for future development, though – our developers will do 
   their best to make a built-in solution in the future.
 * Please feel free to search on our suggestions page ([https://features.wpdatatables.com/](https://features.wpdatatables.com/)),
   to see if someone may be already suggested this feature. If you can’t see it,
   feel free to add your suggestion there, and as more people vote, the feature 
   will move higher on the priority list.
 * You can certainly follow our changeLog if you’d like([https://wordpress.org/plugins/wpdatatables/#developers](https://wordpress.org/plugins/wpdatatables/#developers)),
   where we state any changes/new features/bug fixes during updates;
 * and our newsletter([https://wpdatatables.com/newsletter/](https://wpdatatables.com/newsletter/)),
   so you’re informed about new features, bug fixes, freebies, etc.
 * If you have coding skills and wish to try to make a custom solution now, the **
   custom **workaround example we sent is the only way to achieve it at the moment.
 * As we pointed out in our [Documentation section](https://wpdatatables.com/documentation/information-for-developers/filters/)​
   regarding hooks/filters :
 * Please note that using hooks requires a certain level of programming skill, and
   our support is limited to only advice with an example.
 * We are unable to offer a detailed tutorial or explain each step of the code. 
   Our developers have provided an example, which is the extent of our assistance,
   as they are currently focused on major tasks for plugin maintenance and are unable
   to undertake custom work.
 * Thank you for your understanding.
   We hope that helps. Kind regards.
 *  Thread Starter [sharsharshar](https://wordpress.org/support/users/sharsharshar/)
 * (@sharsharshar)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/use-shortcode-inside-table-single-cell-shortcode/#post-17864946)
 * I think at least tell me where the code should be placed
    -  This reply was modified 1 year, 11 months ago by [sharsharshar](https://wordpress.org/support/users/sharsharshar/).
    -  This reply was modified 1 year, 11 months ago by [sharsharshar](https://wordpress.org/support/users/sharsharshar/).
 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/use-shortcode-inside-table-single-cell-shortcode/#post-17869175)
 * Hello,
   You will find various tutorials online on the subject of how to use hooks
   in WordPress.For example, here is [one from wpBeginners.](https://www.wpbeginner.com/glossary/hooks/)
   You will also find this introduction from our developers on our Hooks [Documentation ](https://wpdatatables.com/documentation/information-for-developers/filters/):
 * [Filters (hooks) in WordPress](https://codex.wordpress.org/Plugin_API) are a 
   type of callback functions that can be defined by the user, and are applied to
   certain values – strings, integers, objects, etc. It is a simple way to adjust
   code output without actually having to modify the code. Essentially, you add 
   a given function on top of an existing one, to override the logic. Then, when
   the plugin is updated later, you won’t lose any of your changes.
 * You can get a detailed description on WordPress hooks [here in WP Codex](https://codex.wordpress.org/Plugin_API)**.**
   
   That being said, one of the ways how you can add your code/custom function is
   to add it to your **functions.php** of the current WP Theme or [Child Theme](https://www.wpbeginner.com/beginners-guide/wordpress-child-theme-pros-cons/).
   This won’t be affected by wpDataTables updates since you are saving it outside
   of our Plugin’s files.Please note that using hooks requires certain level of 
   programming skills and included support refers only to advice.I hope that helps.
   Kind regards.

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

The topic ‘use shortcode inside table single cell shortcode’ is closed to new replies.

 * ![](https://ps.w.org/wpdatatables/assets/icon-128x128.gif?rev=3010404)
 * [wpDataTables - WordPress Data Table, Dynamic Tables & Table Charts Plugin](https://wordpress.org/plugins/wpdatatables/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpdatatables/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpdatatables/)
 * [Active Topics](https://wordpress.org/support/plugin/wpdatatables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpdatatables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpdatatables/reviews/)

 * 12 replies
 * 2 participants
 * Last reply from: [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/use-shortcode-inside-table-single-cell-shortcode/#post-17869175)
 * Status: resolved