Perils
Forum Replies Created
Viewing 6 replies - 1 through 6 (of 6 total)
-
Thank You very Much Mikko!
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Indexing is very slowThanks Mikko.
In the meantime, I have finished indexing and the searches are fast enough.
😉
Excellent pluginForum: Plugins
In reply to: [Relevanssi - A Better Search] Indexing is very slowHi Mikko! Thanks for the answer.
No, unfortunately if I start again with the “index unindexed posts” it immediately slows down.
At the moment I’m using the free version. However, I can consider using the premium version if it solves the problem. Research is fine. It is only indexing which is too slow.It was easy!
OK SOLVED!
add_filter( 'pods_api_pre_save_pod_item_fascicolo', 'slug_set_title', 10, 2); function slug_set_title($pieces) { //check if is new item, if not return $pieces without making any changes //make sure that all three fields are active $fields = array( 'post_title', 'post_name', 'fascicolo_relazione_rivista', 'fascicolo_anno_solare', 'fascicolo_numero' ); foreach( $fields as $field ) { if ( ! isset( $pieces[ 'fields_active' ][ $field ] ) ) { array_push ($pieces[ 'fields_active' ], $field ); } } //set variables for fields empty first for saftey's sake $titolo_rivista = $id_rivista = $fascicolo_anno_solare = $fascicolo_numero = ''; //get value of "fascicolo_relazione_rivista" if possible if ( isset( $pieces[ 'fields' ][ 'fascicolo_relazione_rivista' ] ) && isset( $pieces[ 'fields'][ 'fascicolo_relazione_rivista' ][ 'value' ] ) && is_string( $pieces[ 'fields' ][ 'fascicolo_relazione_rivista' ][ 'value' ] ) ) { $id_rivista = $pieces[ 'fields' ][ 'fascicolo_relazione_rivista' ][ 'value' ]; } $titolo_rivista = get_the_title( $id_rivista ); //get value of "fascicolo_anno_solare" if possible if ( isset( $pieces[ 'fields' ][ 'fascicolo_anno_solare' ] ) && isset( $pieces[ 'fields'][ 'fascicolo_anno_solare' ][ 'value' ] ) && is_string( $pieces[ 'fields' ][ 'fascicolo_anno_solare' ][ 'value' ] ) ) { $fascicolo_anno_solare = $pieces[ 'fields' ][ 'fascicolo_anno_solare' ][ 'value' ]; } //get value of "fascicolo_numero" if possible if ( isset( $pieces[ 'fields' ][ 'fascicolo_numero' ] ) && isset( $pieces[ 'fields'][ 'fascicolo_numero' ][ 'value' ] ) && is_string( $pieces[ 'fields' ][ 'fascicolo_numero' ][ 'value' ] ) ) { $fascicolo_numero = $pieces[ 'fields' ][ 'fascicolo_numero' ][ 'value' ]; } //set post title using $fascicolo_anno_solare and $fascicolo_numero $pieces[ 'object_fields' ][ 'post_title' ][ 'value' ] = $titolo_rivista . ' and ' . $fascicolo_anno_solare . ' and ' . $fascicolo_numero; $pieces[ 'object_fields' ][ 'post_name' ][ 'value' ] = sanitize_title($titolo_rivista . ' and ' . $fascicolo_anno_solare . ' and ' . $fascicolo_numero); //return $pieces to save return $pieces; }Forum: Plugins
In reply to: [Smart COD for WooCommerce] Bug in checkout pagePerfect!!
Thank You Very Much Stratos!
Viewing 6 replies - 1 through 6 (of 6 total)