WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
[resolved] Duplicating wp table reloaded elements. (8 posts)

  1. Jaya
    Member
    Posted 3 years ago #

    Hi Tobias,

    I hope this request finds you well.

    I have made some design changes to the tables, mainly, I've moved the search, the arrows and the table info to the top of the table.

    My questions are :

    1 How can I duplicate all those mentioned above in the same way in a way to have them displayed on top and at the bottom of every table?
    => here is a picture of how I have set them: http://imgur.com/0sHMm.jpg

    2 I'm using the twentyten default wp theme and I would like the wp-table-reloaded tables to be displayed in the search result pages similar to pages and posts. How can I achieve that?

    Thank you in advance for your highly appreciated support and dedication.

  2. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    For question 1:
    This might be possible with a modified "sDom" property in the DataTables initialisation call, see http://datatables.net/examples/basic_init/dom.html and http://datatables.net/usage/options#sDom .
    As far as I understand this, you can write a custom command for that property, which you can use in WP-Table Reloaded by pasting it into the "Custom Commands" textfields in the "JavaScript features" section on the "Edit" screen of your table.

    For question 2:
    I'm not really sure what you mean with this. WP-Table Reloaded will load its CSS and JavaScript on the search result pages as well, so the tables should look the same as in a post or on a page.
    Can you provide a link to your site, where this is not the case?

    Best wishes,
    Tobias

  3. Jaya
    Member
    Posted 3 years ago #

    Thanks for pointing me to the direction to answer the first question. I will see if I can achieve what i need and ask in the datatables support forum if needed.

    Concerning my second question, here is an example: http://bit.ly/8Xhz5c

    regards,

  4. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    thanks for the link.

    As it seems, you search result page does not show the content of the found posts/pages, but only the title of the post/page.
    I guess you will need to modify the template for the search page ("search.php" in your theme's folder, if I remember correctly), by modifying the contained "Loop". Likely, you will need to add a the_content(); template tag, similar to how it is in the other template files.
    If you can manage to show the post content, you will also see the tables.

    Best wishes,
    Tobias

  5. Jaya
    Member
    Posted 3 years ago #

    The content is displayed. I just have nothing else but tables. I added some content to one of the pages that are displayed in the search result link I provided above. It shows it but not the table.

    regards,

  6. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    ok, now that is weird. WP-Table should actually always display something instead of the Shortcode, even if it is an error message.

    Does the theme really use the_content(); in that location or does it maybe use the_excerpt():, which in somecases removes Shortcodes?

    Does this work with other Shortcodes (existing ones like [caption] or fake ones like [foobar /]?

    Regards,
    Tobias

  7. Jaya
    Member
    Posted 3 years ago #

    Thanks Tobias!!

    I couldn't find the content nor the excerpt in the search.php file so I looked in the loop and replaced all the excerpt mentions with content instead. I won't need the excerpts..

    That solved the problem.
    Thanks a lot!

    Regards,

  8. TobiasBg
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    great that this worked!

    Best wishes,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic