Ciao m3820,
se lavori con php ti conviene lavorare sulla stringa che ti restituisce the_permalink.
Esegui un explode eliminando lo slash '/' così ottieni un array.
Successivamente cicli l'array con foreach e reinserisci gli slash dove ti servono saltando ovviamente l'ultimo.
Una cosa del genere:
[PHP]
<?php
$string = the_permalink();
$string_array = explode( '/', $string );
$new_string = '';
foreach( $string_array as $value ) {
// qui ti conviene fare dei test mettendo in echo $value per capire come muoverti, una volta capito come fare fai in questo modo
if( $new_string == '' || empty( $new_string ) ) {
$new_string = $value;
} else {
$new_string .= '/' . $value;
}
}
?>
[/PHP]
- Home
- Categorie
- Coding e Sistemistica
- CMS & Piattaforme Self-Hosted
CMS & Piattaforme Self-Hosted
Discussioni: 20782 Post: 100611
WordPress, Joomla, Ghost e tutti gli altri CMS
Hashtag
- webp
- avif
- contentdeliverynetwork
- cdn
- cloudflare
- 1
- 2
- 3
- 4
- 0
- opensource
- foss
- gratis
- integromat
- substack
- blogletter
- revue
- ghost
- 6ec5a5
- abotricks
- corewebvitals
- 5-7
- g-lanzi
- wordpressbackup
- backup
- wordpressdevelopment
- podcast
- performance
- plugin
- api
- metadati
- woocommerce
- 5-9
- 5-8
- 2006
- wordpresstheme
- wordpress
- polyglots
- wordpressupdate
- gutenberg
- fse
CMS & Piattaforme Self-Hosted