Storing huge number of users in wordpress

In this pursuit, since the students could be thousands in a school, would it be a good practice to have so many entries in the wp_users table by creating a separate user_role : students’? A separate user role will make no difference to site performance or scalability. Or should I create a separate table to … Read more

Push Contact form 7 variable to front end after submission

I have a contact form 7 form that’s sending information to an API. I want to display the API response on the front end. there are 2 ways to go about solving this type of problem, 1- Use the CF7 plugin’s message response hook, add_filter(‘wpcf7_display_message’, ‘my_response_msg’,10,2); function my_response_msg($message, $status){ if(‘mail_sent_ok’==$status){ $form = wpcf7_get_current_contact_form(); //in case … Read more

Styling a category link

Here is an example of how you can do it with your code, using the category name as the class name: <?php // category link $categories = get_the_category(); if ( ! empty( $categories ) ) { echo ‘<a class=”‘ .esc_html( $categories[0]->name ) . ‘” href=”‘ . esc_url( get_category_link( $categories[0]->term_id ) ) . ‘”>’ . esc_html( … Read more