you need to pass the post id as parameter and check it will give the result you want
in function.php
function tr_count($post_id){
ob_start();
the_content();
$content = ob_get_clean();
return substr_count($content, '<tr>');
}
in single.php
echo tr_count(get_the_ID());
Related Posts:
- How can I be certain that a user has verified their email after registration?
- Email confirmation in user registration form without a plugin
- Not receiving any sign up mail, when user registers… Both admin & user
- Custom registration function not working as it should because is_mail and email_exist keep giving errors when it shouldn’t
- Google Apps login in wordpress
- How do I create a password reset link?
- Placeholder text for registration form
- Use the user_activation_key for other purposes
- How to set up User email verification after Signup?
- Stop spam users from registering without disabling user registration?
- How to check if the user registration is allowed/active?
- how to disable user confirmation from administration?
- How to prevent spam users registering even with registration disabled
- Custom registration form page/template
- Mail isn’t sent after local site registration
- Changing username after registration to get around the issue of having duplicate emails?
- Registration key
- User defined password at registration – registration email sends auto generated pass
- Function like is_registration_page to check if current page is registration page
- Payment on Registration?
- WordPress members-only page with link visible only to members
- How do I show errors after validation with a custom form frontend?
- Is there a maximum length to user passwords?
- Registering without e-mail adress!
- Batch users creation
- Checked checkbox?
- Set user password after creating user
- On user registration, if welcome mail sent, add post with new user as author
- How to bypass the username as a required field in registration and just use email address instead?
- Does the user_register change in multisite?
- Registration options and approvals
- user activation email doesn’t work
- How to disallow user to register with a specific word in the username?
- How to stop WordPress emailing a password
- Change User Registration
- On multisite, plugins are disabled prematurely when viewing the /wp-activate.php page file
- Backend user creation form with additional language field
- Restrict certain character combinations in username during registration
- registration form not working
- Override default new user registration email with custom message (non sub-domain multi-site installation)
- How to receive notifications when a new user registers
- Getting thousands of registration spam
- Regsitration form on External page
- Is that possible show user’s post after user login
- allow only lowercase user registrations
- How do I set user account inactive?
- Restrict partially matching usernames
- Filter for users on custom post type
- How to register a user to a group by an invitation code?
- Register form how to get Total Control of it
- Custom user registration
- Modifying the Default Registeration Page?
- Cannot login due to incorrect password right after registration?
- WordPress + bbPress registration user-unfriendly?
- Force display name to nickname wp
- Disable password limitations
- How to integrate CAPTCHA on register page? [closed]
- register_settings callback function erases data
- Custom registration fields not validating
- Register multiple users in one form
- Register through url
- Add ‘first name’, ‘last name’, ‘date of birth’ and ‘terms and conditions’ to register fields?
- How to show password fields on registration form w/o plugins
- Is there any way to not require email address or disable notification upon setting up a member?
- I want to remove the http:// that is added automaticly on the user profile adress
- I need a custom Login Registeration in WordPress can somebody guide me?
- How to enable user registration for specific country and disable registration from all other countries?
- Wikipedia – CMS
- how to change the register process
- remove (error:) from registration errors woocommerce
- Modify new user welcome email
- Redirection after registration
- Updated : how to make email optional while user registration using default wordpress form
- Adding email list as registered users
- Registration – website crashes, error 403
- Placeholder text for ajax loaded conditional fields in the registration form
- Creating custom registration and login page in wordpress
- Link with password is not sent to the new user
- How can I fetch user registration age
- The requested URL /wordpress/register/ was not found on this server
- Redirect to “Thank you” page after register new user on custom register form
- Updating User Meta using Theme My Login with Custom Fields
- WordPress doesn’t send a password (but only a username) after new user registration
- WordPress not sending registration mail? (works on ‘lost password’)
- Macros for WordPress, creating subdomains out of registrations for current domain
- How to make user to logged into website & redirect to homepage after successful registration?
- Prevent registration except through form
- wordpress custom registration
- Multisite/Network What file to edit to change the “new blog” registration text
- Problem with registration page
- How do spam users register while I’ve only enabled registration by Gmail via Janrain?
- How we get the success messages
- wp-signup.php example template
- What hooks, actions or filters i can use to customize wordpress registration page and form?
- registration process with contact from 7? [closed]
- Can email address be used as user name?
- Website visible only to Registered users (non wp-admin)
- Verify user is Eventbrite attendee when creating new WordPress account
- Limit username to specific characters (A-Z and 0-9)
- Change default error message “This email address is already in use” when registering a new user in WordPress using Caldera Forms