jjyepez
Forum Replies Created
-
Forum: Plugins
In reply to: [BuddyPress Docs] Function to show doc tagsTry using:
$output = ''; $doc_tags = wp_get_object_terms( $post->ID, 'bp_docs_tag' ); foreach ($doc_tags as $tag_id => $tag) { $output .= ( $tag->name ).', '; } echo $output;
Or something alike.
Cheers.
—
jjyUPDATE: In short, use object referentiation instead of array index.
$tag->name instead of $tag[‘name’] … and check it out.Hi Nightjar,
Are you making a proper “custom type” selection on the Advanced Post List settings header?
If so, as I can see, that short code “ecpt_field” is based on a different $post object var than the generic $post used in the loop ..Remember that Advanced Post List uses a generic $post reference as shown in the example.
Perhaps, you should pass the ecpt_field shortcode the $post->ID that is currently received by the sh_code function.
Regrds & success,
—
jjyepezForum: Plugins
In reply to: Update all "post_name" and "guid" by the new title..Not sure if this is what you are looking for, but .. hopefully this can fix it.
You can do a bulk update (by hand) on your wp_posts table.
UPDATE wp_posts set guid=replace(guid,”https://previous.domain/”, “https://new.domain”);
UPDATE wp_posts set post_name=replace(post_name,”old-string”, “new-string”);
WARNING: Since this is a BULK-NON-UNDOABLE update … you MUST back up your data before executing any bulk changes.
Please take care on this so I am not responsible for any mistakes or unexpected results.
Regards and success,
—
jjyYes, of course you can use this the way you consider more useful for others.
And thank YOU for creating this amazing piece!
??Best regards,
—
jjyepezYou can’t do it directly, but you can define your custom php functions and use them through [php_function name=”{function_name}” param=”{params_string}”] ….
Refer to this topic for an example: https://www.ads-software.com/support/topic/plugin-advanced-post-list-using-shortcodes-in-list-content-section?replies=2
Remember that the first parameter received through your custom function must be $post (it is sent implicitly), then your params_var.
Hope this help.
??Regards,
—
jjyepez<<< spanish translation – traducción al castellano>>>
Antes que nada me gustaría agradecer publicamente a los autores de este increible plugin. Es realmente genial para desarrolladores.
Dicho eso,
He descubierto la manera de insertar shortcodes en la sección List content, con lo que se puede ampliar aún más el poder de este plugin.Espero que este post sea de ayuda para todos.
—
1.- Haz lo necesario para habilitar el uso de [php_function name=”function_name” param=””] en el APL. Detalles en (sitio de kalinbook).
2.- Crea una función en wp-config.php inmediatamente luego de definir la constante “KALINS_ALLOW_PHP”, similar a la siguiente:
define("KALINS_ALLOW_PHP", true); function sh_code($post, $shcd){ $shcd=str_replace('#','"',$shcd); //necesario para usar las " if(function_exists('do_shortcode')){ $salida=do_shortcode('['.$shcd.']'); }else{ $salida="[error: la funcion do_shortcode no existe!]"; } return $salida; }
3.- Usa el código [php_function name=”function_name” param=””] de la siguiente manera -en la sección List content-:
[php_function name="sh_code" param="gallery id=#[ID]# size=#medium# columns=#3#"]
NOTA: Presta especial atención en el uso de ?[ID]? y ?#? en el ejemplo anterior .. ?[ID]? es un código propio de APL que es interpretado antes de param.
Bien, eso es todo! Lo he probado con éxito asi que, FUNCIONA!
Que lo disfruten!De nuevo, gracias a los creadores de este increible plugin.
Saludos,
—
jjyepezhttps://www.ads-software.com/extend/plugins/advanced-post-list/