You can put svg text right in the prev_text and next_text.
To make it a little more readable here I’ve broken it up and prepared the SVG markup first. I am only show you the “prev” link but the “next” would work the same way.
$prev_label = "<span class="cover--nav-label">" . _e('Recette précédente', 'marque') . "</span>";
$prev_arrow = "<svg class="icon icon-arrow-prev" role="presentation" focusable="false"><use xlink:href="" . get_template_directory_uri() . "/images/symbol-defs.svg#icon-arrow-prev"></use></svg>";
$prev_text = $prev_label . $prev_arrow;
the_post_navigation( array(
'prev_text' => $prev_text
) );
Note that the_post_navigation will be wrapping your prev_text (and next_text) within the tag and applying the appropriate link target, so you don’t include that part here.
Related Posts:
- Display page number on custom page title function
- Add multiple custom fields to the general settings page
- When should you, and when should you not, use wp_list_pluck()?
- Display random categories on the front page (Finding and Editing Theme Functions)
- paginate_links() don’t properly work in search.php?
- Is it possible to remove the “standard” post format?
- How to paginate the get_users function?
- Woocommerce add to simple product attribute programmatically [closed]
- Issue with get_theme_mod returning a blank value instead of the saved value
- Pagination adding page-numbers dots when using ‘mid_size’ => 0
- How to remove row-actions from pages table?
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Modify search function in WordPress (TwentyTwelve)
- Paged Single Post doesn’t redirect to the main url after Removing Pagination
- How to customize search result page title?
- Auto delete WordPress images/thumbnails (all sizes) and featured after X days/hours, or similar?
- How to fix a theme with page.php Default Template that accidentally deleted?
- How to style current page number (wp_link_pages)?
- Using get_terms for custom taxonomy in functions.php
- Removing Unnecessary Text from Admin Menu without CSS
- Set default options for inserting media
- Default or Preset Content for Custom Post Types
- Remove tag on my RSS Feed
- Display WordPress Search
- How do I change parameters without changing the core
- Problem with extract() with custom shortcode
- How to add a rel attribute to images that contains their categories?
- add sidebar area to header of child theme
- Preferred Use of home_url()?
- Custom function for user register in wp?
- Customize “the_posts_pagination” and put list instead div
- Theme-Config tab in admin Pannel?
- Creating loop within functions.php
- How to Add a Random Custom Gravatar in the WordPress Comments?
- Delete pages and Create default pages for all new network sites
- Actions according to image type and size
- Post thumbnail relative link and HTML modify
- Find first image on paginated post for Pinterest
- Post Pagination Showing Same Posts Every Page
- Refactor create_function
- adding custom classes for tables
- Pass Shortcode Attribute to footer Script
- How to mass-delete inline styles in WordPress custom post type automatically?
- How would go about if I just want a temporary function?
- Remove the deleted users avatar from list
- Generating rel=prev and rel=next only on wordpress categories
- How to call custom function from functions.php in site-wide template files?
- Customizer field value into functions.php variable
- How to preserve edits to Name or Slug of term when using wp_update_term on save?
- PHP files included in functions.php don’t seem to work
- How Can I Expand the WordPress Customize window without any Plugin?
- Set quantity of woocommerce product on page visit [closed]
- wp_dropdown_categories and custom attribute
- str_replace function in theme
- Automatically wrap multiple images in div
- Ajax not working properly
- How To Show Shortcodes In WordPress Custom Fields?
- Help! Need a different logo on my main page from my other pages
- Change post count on tag/terms pages to 10
- Pagination not working on my archive page for a custom post type
- How to make an If Else on Excerpt Filter
- How to replace words in my posts and saved new words
- How to prevent multiple custom terms from being created
- How do I integrate my Child Theme into a Custom Template?
- Shortcode to eliminate and replace with
- WordPress not showing pagination links
- Add functionality to post editor
- custom post with loading script per single post
- Pagination in Search result
- Get Value of Custom Field
- restrict access to specific urls on a specific period of time
- child_of not working while searching
- How to request login for user but not for bots
- functions.php / replacing div’s with new ones?
- Adding pagination to custom WordPress function
- Why does modifying my functions.php file always result in a server error
- Modifying Page-Links format
- Post variables not displaying correctly in custom function
- Remove snippets of JS from core
- wp_get_current_user->user login returns %20 for spaces
- Removing Facebook contact field from user contact not working
- How do I add functionality to images?
- Explode Array from Repeatable Custom Field
- WordPress is adding pagination for all pages not only for blog page, How to remove pagination for all pages except blog/posts page?
- WordPress Custom wp mail template return full template
- Problem with removing characters “<” – WpAllImport
- How to create a post without link in wordpress?
- How to crop image in WordPress with aspect ratio for any size of image
- multible shortcodes (for differnt values) with one function
- Insert image between X number of posts but on specific paginated pages?
- delete_term is not working properly with add_action()
- post_row_actions filter from parent theme not executing in child theme
- Customizer cuistom CSS Priority ordre Issue
- Copy and Modified WooCommerce function is_coupon_valid [closed]
- BuddyPress Edit activity function good practice
- wp_login_form display no styled form
- Advanced Custom Fields in WP_Query: Clickable Text in List Format
- Overriding an existing filter
- Add custom css to specific user
- How can I restrict comments on WordPress, so only the POST AUTHOR and the user who commented can see them?