janrussel
Forum Replies Created
-
Forum: Plugins
In reply to: [Table Maker] add background color to table rowI modified the file table-maker/inc/class-wpsm-table-maker.php to add a class to the <tr> tag based on the row number.
I replaced
in_array($i, $sub_array) ? ‘<tr class=”subheader”>’ : ‘<tr>’;with
echo in_array($i, $sub_array) ? ‘<tr class=”subheader tm-row’ . $i . ‘”>’ : ‘<tr class=”tm-row’ . $i .'”>’;so that I could style the rows in CSS with something like:
.tbl-my-table .tm-row4 td
{
background-color:#ccffff;
}Would it be possible to incorporate this type of change into your plugin? Would you also consider adding a “change row colour” option/button for each row to the backend?
Perfect! Thanks so much for your quick reply!
Have a nice day. 🙂
I just noticed that the post_name field include the “slug” name for the 1st post and then <post_id>-revision-v1 for any updates.
It looks like _tml_action entries are supposed to include the post_id of the original post. Somehow this got messed up for my profile page.
I just went and changed the id to the id for the original your-profile page and now it looks good and working the same as in my dev environment.
Further to my previous post…
I looked up the most recent post id (in wp_posts) of the Your Profile page and noted the ID. I replaced the post_id field in wp_postmeta (_tml_action=profile) with the post id of the Your Profile page.
Now the profile page appears when I login.
I noticed the other _tml_action fields were not corresponding to the latest post id (of each page).
Is there an automatic way to update the post_id for _tml_action when the page changes?
Thanks Jeff for your reply.
I forced the page to go to the profile by including:
[theme-my-login default_action=”profile”]
instead of
[theme-my-login]
but the format was not quite right (didn’t match dev environment).I logged into phpMyAdmin to check the postmeta info.
I searched for %tml% in the meta_key field of wp_postmeta and noted the post_id for the profile action. I searched wp_posts for the id and found it.
I repeated the process on my live site. I found a post id for the profile action record but when I looked up the id in wp_posts there was no result.
I’m not sure what I’ve done wrong…
Any suggestions on how to correct this?
Forum: Plugins
In reply to: [Theme My Login] Login goes to home page instead of user profileI encountered this problem after upgrading WordPress and upgrading TML. The login used to go to the user profile.
I was able to get this to work again by adding the following code to the child theme functions.php file:
function login_to_user_profile() {
return ‘your-profile’;
}
add_filter(‘login_redirect’, ‘login_to_user_profile’);