Hide the Submit Button on Calculator Forms

/** * For the Accordion Template, this is a helper script * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ /* CSS hide submit button for any calculator only forms */ button.wpf-calc-form { visibility: hidden; }Continue reading

Add the type property to that Image property in the Organization schema

add_filter( ‘aioseo_schema_output’, ‘add_author_name_when_missing’ ); function add_author_name_when_missing( $schema ) { foreach ( $schema as &$schemaItem ) { if ( isset($schemaItem[‘@type’]) && ‘Organization’ === $schemaItem[‘@type’] ) { if(!isset($schemaItem[‘image’][‘@type’])){ $schemaItem[‘image’][‘@type’] = ‘ImageObject’; } } } return $schema; }Continue reading

Set max-video-preview to 0

add_filter( ‘aioseo_robots_meta’, ‘aioseo_filter_robots_meta’ ); function aioseo_filter_robots_meta( $attributes ) { $attributes[‘max-video-preview’] = ‘max-video-preview: 0’; return $attributes; }Continue reading

Add CPTs for Typesense

function cm_typesense_add_available_post_types( $available_post_types ) { //Edit, delete or add according to your information $available_post_types[‘docs’] = [ ‘label’ => ‘Documentation’, ‘value’ => ‘docs’ ]; $available_post_types[‘actualites’] = [ ‘label’ => ‘Actualités’, ‘value’ => ‘actualites’ ]; $available_post_types[‘notes_versions’] = [ ‘label’ => ‘Notes de…Continue reading

Hide unnecessary roles

add_filter( ‘editable_roles’, function( $roles ) { if (!current_user_can(‘administrator’) && !is_admin()) { unset( $roles[‘administrator’] ); } unset( $roles[‘editor’] ); unset( $roles[‘subscriber’] ); unset( $roles[‘revisor’] ); unset( $roles[‘docspress_manager’] ); unset( $roles[‘author’] ); unset( $roles[‘contributor’] ); return $roles; } );Continue reading