nateW
In den letzten 30 Tagen erstellte Support-Threads: 0
Lieblings-Forenthemen
This user has no favorite topics.
Forum Topics Created
| Status | Thema | Supporter | Stimmen | Artikel | Aktualität |
|---|---|---|---|---|---|
|
Removing Comma and Text Following
Gestartet von: nateW in: Toolset Professional Support |
|
2 | 5 | vor 3 years, 11 months | |
|
Number Field Comma – Error when using custom shortcode
Gestartet von: nateW in: Toolset Professional Support |
|
2 | 3 | vor 3 years, 11 months | |
|
Custom shortcode to remove text after a comma
Gestartet von: nateW in: Toolset Professional Support |
|
2 | 3 | vor 4 years, 3 months | |
|
Inserting a Dynamic URL into an iframe code
Gestartet von: nateW in: Toolset Professional Support |
|
2 | 4 | vor 4 years, 4 months | |
|
Blank number field is outputting a 0
Gestartet von: nateW
in: 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 | vor 4 years, 4 months |