Custom post types
-
Hi Tobias,
I’m using another plugin called Better Notifications for WordPress and this plugin use now public custom post types. For some reason Tablepress custom post types seems not be public. is there any reason to have these set as private?
If not can it be changed to get this as public?
Per
-
Hi Per,
correct, those will still be the default settings.
Yeah, TablePress does not save the creation date of table, sorry 🙁
Unfortunately, I can’t really think of a solution that might be helpful here 🙁Regards,
TobiasI checked in wp_post and creation date exist under post_date for each table so it should be possible to have an if statement post_date = today() do this else do that.
So question is if we can use this and how?
Hi,
yes, the date is saved in the
wp_poststable, but TablePress is currently not populating it into the table object.
The relevant code for this should be in model-table.php and model-post.php.Regards,
TobiasOk now I dont understand, is the relevant date stored in these 2 files or how do you mean that some function in these can be called to get the date of creation?
Or is this something you can add in to future version as its not so important right now?
Hi,
those two files handle how a table is read/saved from a post in the
wp_postsentry.I might be able to add the “created” date to the table, but I can’t promise it yet.
Regards,
TobiasHi Tobias,
I have now used the small plugin to get notifications whenever tables are updated and its working fine. Now I just wonder if its possible to get the data aligned to the right instead of left as all amounts should preferably be aligned to right rather then left?
Also any news around adding creation dates to table?
Per
Hi,
do you want to align the table data in the email or on the site? For the site, you could use some CSS like
.tablepress-id-123 th, .tablepress-id-123 td { text-align: right; }I’m not sure though what the best way to add CSS to an HTML email is…
Regarding the creation date: No, sorry, I haven’t had much time for development on this in the last weeks. Sorry 🙁
Regards,
TobiasHi
Its in the mail we want the same as we have on site ie align right. Just wonder where in code should I apply text-align=right? I tested inside do_shortcode but no luck. So any suggestion?
Per
Hi,
you will have to do this as CSS code, but I don’t know where you’d have to add the CSS in the email content. You could maybe try a
<style>block.Regards,
TobiasHello Per,
I also tried to use Better Notifications for WordPress to send out notifications when a Tablepress table was updated. After realizing it wouldn’t send the updates, I came across this post. I’m glad somebody was able to find a way to do it.
Would you be willing to share your plugin so I could download and install it? It is exactly what I have been searching for. Also, did you find a way to populate the To: field; I am hoping to have it send to the members of administrators and subscribers groups.
Thank you,
KevinHi
I can post code later as I’m not home right now but the to field have to be manage manually directly into code as we have a fixed number of members I didnt do any solution for this.
Per
Hi,
@kshepard: The code for sending such an email is not too difficult, see e.g. the post https://wordpress.org/support/topic/custom-post-types-208?replies=58#post-6828769 in this thread. You will however have to extend it to send emails to special members/groups.
Regards,
TobiasPer – Just wanted to update you that I was able to get it working, but thank you for offering to post the code.
Tobias – You were right, once I got into it I was able to see it wasn’t too difficult to implement this.
Thanks again to both of you for your help.
Kevin
Hi Kevin
How did you solve fetching members email addresses or did you use our manual solution?
Per
The topic ‘Custom post types’ is closed to new replies.