wordpress-logo

To disable access to author page (author archive), simply add this code snippet to functions.php file: // Disalbe access to author page add_action('template_redirect', 'my_custom_disable_author_page'); function my_custom_disable_author_page() { global $wp_query; if ( is_author() ) { $wp_query->set_404(); status_header(404); // Redirect to homepage // wp_redirect(get_option('home')); } } add_action( 'template_redirect', 'remove_author_pages_page' );...

Read More
wordpress-logo

Add Additional Mime Types in functions.php add_filter(‘upload_mimes’,’add_custom_mime_types’); function add_custom_mime_types($mimes){ return array_merge($mimes,array ( ‘eps’ => ‘application/eps’, ‘jpg’ => ‘image/jpg’, ‘png’ => ‘image/png’, ‘jpeg’ => ‘image/jpeg’, ‘pdf’ => ‘application/pdf’, ‘doc’ => ‘application/doc’, ‘docx’ => ‘application/vnd.openxmlformats-officedocument.wordprocessingml.document’, ‘gif’ => ‘image/gif’, )); }...

Read More
mysql

Log in to MySQL from terminal mysql -u root -p Run MySQL commands CREATE database_name; CREATE USER 'some_user'@'localhost' IDENTIFIED WITH mysql_native_password BY ‘your_password’; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, TRIGGER, REFERENCES ON database_name.* TO 'some_user'@'localhost'; Edit above privileges as needed  ...

Read More
event espresso

/* Event Espresso - hide the event price in the registration form */ p.event_prices {display:none;} .event_espresso_form_wrapper ul li {     margin-top: -20px;     margin-left: 122px;     white-space:nowrap;     list-style-type: none; } #event_espresso_attendee_verify tr:nth-child(2), #event_espresso_attendee_verify tr:nth-child(4){ display: none; } #event_content .address-block br { display: none; } /* EE4 - Hide Show Details */ .display-tckt-slctr-tkt-details.display-the-hidden.lt-grey-text.smaller-text {display:none;} /* Change EE4 Price to free */ .ee-ticket-selector-ticket-price-th {     display: none; } /* Hide EE4 Price table header */ .tckt-slctr-tbl-td-price {     display: none; }  /* Change EE4 default...

Read More