Categories
WordPress

WordPress

And the Jazz Artists.

WordPress is an open source content management system. This system is the most popular CMS due to the great flexibility it provides and the option to manage a site even without extensive programming knowledge.

A significant option in WordPress is to create a Multisite network, ie multiple sites based on the same code, making it easier to manage and maintain them.

To improve system security at the server level: Update frequently, choose passwords at least 8 characters long (lower and upper case alphabets, numbers and symbols) and replace them frequently, verify that there is a firewall and DDOS protection, and config the Intrusion Prevention System (enable mod_remoteip if used with reverse proxy), set up hiding of the web server details, scan the server files and pass on the logs frequently.

To improve system security at the WordPress level: Update frequently, report any suspicious activity in your account to your hosting provider, use the build-in tool “Site Health”, install few plugins as possible, remove unused themes, install SSL certificate, set up Two-Factor Authentication, and disable the themes and plugins editors by adding the directive to wp-config.php file:

define( 'DISALLOW_FILE_EDIT', true );

Disable the XML-RPC function and the directory browsing option by adding the directives to the .htacess file:

<Files "xmlrpc.php">
Order Allow,Deny
Deny from all
</Files>

Options -Indexes

And disable PHP execution in the uploads directory by creating inside a .htaccess file with the content:

<Files "*.php">
Order Deny,Allow
Deny from All
</Files>

Scan frequently the code in the WordPress directory and database for malwares detection and delete unused items, create full backup before each modification, consider reinstalling WordPress (core files, themes and plugins) from the Dashboard. Make use of the recently modified files command:

find ./ -type f -mtime -15

To remove the Mobile Spam Popup malware, delete the wp-tmp.php, wp-vcd.php, wp-feed.php files from wp-includes directory and delete the code which is creating them from the themes’ functions.php.

To remove the Japanese Keyword Hack malware, clean the malicious code from .htaccess, wp-config.php, sitemap.xml files and uploads directory.

To run WordPress website with SSL in reverse proxy, add the directive to wp-config.php (above “That’s all, stop editing!”):

$_SERVER['HTTPS'] = 'on';

To workaround the loopback error while using the Theme Editor, edit the theme while another theme is temporarily active.

To improve the SEO for the WordPress: use responsive template, config permalink by post name and the media path without date, set the URL slugs in English, and speed up the WordPress.

To optimize the WordPress Speed: Turn off Trackbacks & Pingbacks, decrease media size before upload, disable posts Update Services, and limit autosaves and revisions by adding the directives to the wp-config.php file:

define('AUTOSAVE_INTERVAL', 300 );
define('WP_POST_REVISIONS', false );

To control the file storage and upload size limit, the available space on the server, the size of the hosting plan, the hosting panel settings, the WordPress multisite settings, and the files (located in multiple locations): php.ini, .user.ini, .htaccess, wp-config.php, functions.php.

To change theme files in WordPress, create child theme. To change WordPress functionality, use built-in hooks (which are seperated to actions and filters), add the hooks into child theme’s functions.php. To change WordPress styles, use the Dashboard => Appearance => Customize => Additional CSS, and in order the change the styles of the Dashboard itself:

add_action( 'admin_head', 'condless_admin_custom_css' );
function condless_admin_custom_css() { 
	echo '<style>
	// Your custom CSS
	</style>'; 
}

To customize the Twenty Twenty theme header structure, make use of the CSS:

.cover-header-inner-wrapper { min-height: 60vh !important; }
.home .entry-header { display: none; }
.home .post-inner { padding: 0; }

To limit the length of the code block, make use of the CSS:

pre.wp-block-code { max-height: 30vh; }

To use new fonts, make use of the CSS:

@font-face {
    font-family: $font_family_name;  
    src: url($font_url);  
    font-weight: normal;
}

* { font-family: $font_family_name, Arial, sans-serif; }

To limit post/page creation for author:

add_filter( 'wp_insert_post_empty_content', 'condless_cancel_post_save', 99, 2 );
function condless_cancel_post_save( $maybe_empty, $postarr ) {
	$post_query = new WP_Query( array( 'post_author' => $postarr[ 'post_author' ], 'post_type' => $postarr[ 'post_type' ], 'post_status' => array ( 'any', 'trash', 'draft' ) ) );
	if ( $postarr[ 'ID' ] == 0 && ( $postarr[ 'post_type' ] == 'page' || $postarr[ 'post_type' ] == 'post' ) && ! current_user_can( 'manage_categories' ) && $post_query->found_posts >= 3 ) {
		return true;
	}
	return $maybe_empty;
}

Enable use of session variables:

add_action( 'init', 'condless_activate_session', 1 );
function condless_activate_session() {
    if( ! session_id() ) {
        session_start();
    }
}

E-commerce.

Tags for effective social media sharing.

Contact forms. For custom design, make use of the CSS:

.wpcf7-form {
	background: #dcc8a5;
	padding: 10px 20px;
	border: 2px solid #f6efdf;
	border-radius: 7px;
	max-width: 300px;
}
 
.wpcf7-form p {
	color: #4f2a0f;
	margin-bottom: 5px;
}
 
.wpcf7-form input, .wpcf7-form textarea, .wpcf7-form select {
	background: #f6efdf;
	padding: 5px 7px;
	margin: 4px 0 8px 0;
	border: 3px solid #ccb58c;
	color: #4f4f4f;
	border-radius: 7px;
}
 
.wpcf7-form .wpcf7-submit {
	background: #4f2a0f;
	padding: 5px 15px;
	color: #fff;
	min-width: 100px;
}
 
.wpcf7-form input[type="submit"]:hover {
 	background: #000;
}

Multi language.

Forums with moderation options.

Social network with private area.

Ads board.

Slider. To create full width video, make use of the CSS:

.wp-video, video.wp-video-shortcode, .mejs-container, .mejs-overlay.load {
	width: 100% !important;
	height: 100% !important;
}
.mejs-container {
	padding-top: 56.25%;
}
.wp-video, video.wp-video-shortcode {
	max-width: 100% !important;
}
video.wp-video-shortcode {
	position: relative;
}
.mejs-mediaelement {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}
.mejs-controls {
	display: none;
}
.mejs-overlay-play {
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: auto !important;
	height: auto !important;
}

Image hover effects.

As you probably have noticed- Pastorius, Carter, Vald├ęs, and all other WordPress Version names, are names of popular jazz artists, inspired by WordPress core developers, who share a love of jazz music.