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()?
- 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?
- Modify search function in WordPress (TwentyTwelve)
- 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?
- Using get_terms for custom taxonomy in functions.php
- Remove tag on my RSS Feed
- How do I change parameters without changing the core
- Problem with extract() with custom shortcode
- add sidebar area to header of child theme
- Theme-Config tab in admin Pannel?
- Creating loop within functions.php
- How to Add a Random Custom Gravatar in the WordPress Comments?
- Post Pagination Showing Same Posts Every Page
- adding custom classes for tables
- Pass Shortcode Attribute to footer Script
- How to mass-delete inline styles in WordPress custom post type automatically?
- 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
- Automatically wrap multiple images in div
- Ajax not working properly
- Include default functions and methods
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- How can I modify all existing tags while keeping the urls themselves?
- Best practices regarding the creation of custom widgets?
- Unable to login using username
- Word Press – Dynamic Content [closed]
- Pagination in relation to archive.php
- paginate_links() don’t properly work in search.php?
- different style sheet for just one page template
- Remove a category from a post when saving a new post
- Condition OR for current user ID
- Where do I store custom functions that call custom page template files?
- Where to call my pagination function?
- Wp-query Order By problem
- login_headertitle is deprecated since version 5.2.0
- Remove ‘page-numbers’ class from prev and next tags
- Modifying the_posts_pagination from within functions.php instead of template files
- Add attribute only to first image of every post via functions.php
- Different favicon on different pages
- The_content and Preg_replace in loaded Iframe [closed]
- Get term slug by term id and then explode it
- Problem with images URL after filter applying
- two search forms on the same page
- Insert a field with PREG_REPLACE – strange behaviour
- How to echo Widget Title in Custom Frontend-Template Box
- New checkbox in custom widget isn’t saving data
- how to display a page before the home page
- loginout function customization
- Function to check if custom page is used by page?
- implementing a centralized content “show-do-not-show” toggle?
- How would I make a function to dynamically determine if user is logged to change navigation menu text?
- How to display this meta data (an array) in form of a function (created with a custom write panel)?
- WordPress – using sessions?
- How to get taxonomy tree ids without running expensive loops
- How to remove font awesome from loading in wp theme
- Using get_terms for custom taxonomy in functions.php
- Header menu aligned right on all pages except for single-post page [closed]
- CF7 select value get to function and reciept value from function
- I am trying to set post terms to a custom taxonomy
- Extend WordPress Audio Widget to accept HLS (.m3u8) URLs
- Shortcode to insert default text and change one word throughout it?
- How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?
- How would I correctly implement a new if statement in a child functions file?
- WordPress Ajaxifying not working properly
- Shortcode with pagination advancing multiple queries
- WordPress function with attribute pass to template
- Will dequeueing in child theme functions.php file prevent Google Fonts from loading?
- Adding A New Widget to WordPress Disables the Existing Widgets
- How To Show Shortcodes In WordPress Custom Fields?
- Help! Need a different logo on my main page from my other pages
- Pagination not working on my archive page for a custom post type
- How to replace words in my posts and saved new words
- 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
- child_of not working while searching
- Why does modifying my functions.php file always result in a server error
- Modifying Page-Links format
- 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
- Explode Array from Repeatable Custom Field
- WordPress Custom wp mail template return full template
- How to create a post without link in wordpress?
- 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