nateW
Admite hilos creados en los últimos 30 días: 0
Debates favoritos del foro
Este usuario no tiene debates favoritos.
Temas del foro creados
| Status | Debate | Supporter | Voces | Mensajes | Caducidad |
|---|---|---|---|---|---|
|
Removing Comma and Text Following
Iniciado por: nateW en: Toolset Professional Support |
|
2 | 5 | 3 years, 11 months ago | |
|
Number Field Comma – Error when using custom shortcode
Iniciado por: nateW en: Toolset Professional Support |
|
2 | 3 | 3 years, 11 months ago | |
|
Custom shortcode to remove text after a comma
Iniciado por: nateW en: Toolset Professional Support |
|
2 | 3 | 4 years, 3 months ago | |
|
Inserting a Dynamic URL into an iframe code
Iniciado por: nateW en: Toolset Professional Support |
|
2 | 4 | 4 years, 4 months ago | |
|
Blank number field is outputting a 0
Iniciado por: nateW
en: Toolset Professional Support
Problem: The code to add commas to the numbers to separate the thousands shows 0 when the result of the custom field is empty. Solution: Change the code to this:
add_shortcode( 'ts_format_number', 'ts_format_number_func');
function ts_format_number_func( $atts, $content ) {
$int = (int) do_shortcode($content);
if ($int == null) {
return "";
} else {
return number_format($int, 0);
}
}
|
|
2 | 3 | 4 years, 4 months ago |