mallorcagirl76
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Get postings from the parent post termI need it not in template. I need it hardcoded as php
Forum: Developing with WordPress
In reply to: Update more terms with wp_set_object_termsCould you please give me a complete example of the code…sorry
Forum: Developing with WordPress
In reply to: Get postings from the parent post termThe term under “Kategorie”
Forum: Developing with WordPress
In reply to: Get postings from the parent post termNo sorry I wanna have the postings from the taxonomie “Kategorie” in pod “release” with the term of the current posting.
Forum: Developing with WordPress
In reply to: Update more terms with wp_set_object_termsI tryed to duplicate the function renamed. It gives no critical failure but it doesent save the values.
Forum: Developing with WordPress
In reply to: Shorten php for the last letterPerfect ! Many thanks !
Forum: Developing with WordPress
In reply to: Shorten php for the last letterThank you but I dont know how to put it in a correct way with my
<?php echo pods_field_display( 'voe_kategorie' );?>
Sorry ??
Forum: Developing with WordPress
In reply to: Update more terms with wp_set_object_termsBecause if I copy the same code with my new edits behind the first in functions.pho I get an critial php error
Forum: Developing with WordPress
In reply to: Update more terms with wp_set_object_termsThank you but how I gotte do it for this two exactly I dont get it ??
Forum: Developing with WordPress
In reply to: Update more terms with wp_set_object_termsSo like I wrote I wanna update a FURTHER taxonomy keeping this what I wrote so both !
Forum: Developing with WordPress
In reply to: Update more terms with wp_set_object_termsReplacing makes no sense. I wanna have BOTH genre AND voe_kategorie
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Post Title from value of PODS fieldIf i do php checker it says: “PHP Syntax Check: Parse error: syntax error, unexpected ‘}’ in your code on line 20”
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Post Title from value of PODS fieldI did it like this but I get an critical WP error:
add_filter( 'pods_api_pre_save_pod_item_release', 'slug_set_title', 10, 2); function slug_set_title($pieces, $is_new_item) { //check if is new item, if not return $pieces without making any changes if ( ! $is_new_item ) { return $pieces; } //make sure that all three fields are active $fields = array( 'post_title', 'artist', 'featuring_artist' ); 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 $artist = $featuring_artist = ''; //get value of "artist" if possible if ( isset( $pieces[ 'fields' ][ 'artist' ] ) && isset( $pieces[ 'fields'][ 'artist' ][ 'value' ] ) && is_string( $pieces[ 'fields' ][ 'artist' ][ 'value' ] ) ) { $artist = $pieces[ 'fields' ][ 'artist' ][ 'value' ] } //get value of "featuring_artist" if possible if ( isset( $pieces[ 'fields' ][ 'featuring_artist' ] ) && isset( $pieces[ 'fields'][ 'featuring_artist' ][ 'value' ] ) && is_string( $pieces[ 'fields' ][ 'featuring_artist' ][ 'value' ] ) ) { $featuring_artist = $pieces[ 'fields' ][ 'featuring_artist' ][ 'value' ] } //set post title using $artist and $featuring_artist $pieces[ 'object_fields' ][ 'post_title' ][ 'value' ] = $artist . ' and ' . $featuring_artist; //return $pieces to save return $pieces; }
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Post Title from value of PODS fieldOk its function now. Post Type was to edit for my post type.
BUT…Now its dowing the authors name and the date as title.
How can I get the title from three of my fields ?Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Post Title from value of PODS fieldI did yll like in the description. Now I have an only redable field but how I can get now this what I wrote above ? Dont check it