Created
May 28, 2015 08:11
-
-
Save thierrypigot/6805cf207678970f4a46 to your computer and use it in GitHub Desktop.
WordPress : Récupérer l’url de la page statique blog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $posts_page_id = get_option( 'page_for_posts' ); | |
| $posts_page = get_page( $posts_page_id); | |
| $posts_page_title = $posts_page->post_title; | |
| $posts_page_url = get_page_uri( $posts_page_id ); | |
| ?> | |
| <a href="<?php echo get_bloginfo( 'url' ) .'/'. $posts_page_url; ?>">Toutes nos actualités</a> | |
| OU | |
| <a href="<?php echo get_bloginfo( 'url' ) .'/'. $posts_page_url; ?>"><?php echo $posts_page_title; ?></a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment