You can do it easily with jQuery by using .eq() to add a specific class to each i element.
Example:
Add a class to your i element from PHP.
<?php wp_list_pages('link_before=<i class="retina_icon"></i>&link_after=<br >'); ?>
Then add another class to it with jQuery.
jQuery('.retina-icon:eq(0)').addClass("retina-icon-1");
jQuery('retina-icon:eq(1)').addClass("retina-icon-2");
Related Posts:
- Why is wp_list_pages altering $post->ID of the page?
- How to add a custom field in the advanced menu properties?
- How to enable custom fields for pages (if not a bad practice)?
- Adding a custom field to the site identity menu
- How to add add_meta_box to specific Page Template?
- Having different sidebar content for MANY pages?
- Add meta data to the menu
- Custom Page Template [closed]
- Create a select drop down of available menus
- Calling Specific Pages with wp query Part II
- Loop through two different sets of custom fields
- Dynamic User State & City selection
- Add input field to ‘Pages > Edit Page’ through functions.php
- wp_list_pages sort order is different for different languages [closed]
- wp_list_pages: only show subpages on the parent page?
- Calling custom fields for pages (not posts)
- Creating a custom menu/widget area
- Nav Menu – Add class based on meta keys
- How to Display pages with a Custom Fields in one page
- wp_list_pages() but only show children on the branch you are on
- Add image to menu item with ACF
- Advanced Custom Fields dynamic update_field
- Declaring in variables [closed]
- How to add a custom field in the advanced menu properties?
- Displaying different page links on different pages
- get_post_meta() retrieves meta from a specific post on pages, not the page currently viewed
- How to pass page as an argument like post in WordPress?
- Walker class for sub-menu with ACF fields
- How can I use custom properties to set different background on different pages?
- Displaying pages with a specific custom meta
- Dynamic menu wp_list_pages displaying only current branch including: current page, his siblings and its childs
- Display a different image for each page with editor
- wp_list_pages Hierarchical Help
- Interrogate a page within a loop to check template type or custom meta data (Pages vs Posts)
- Populate wordpress menu with link to custom field value (file download)
- Check if page has subpages
- Parent/Child pages
- Display the output from Custom User Fields from a WordPress user profile on a WordPress Custom Page
- Show Custom field value instead of title in WP Menu
- How to make menu country specific?
- Load one page with parent and child pages
- Page template is missing fields or is invalid when I updating the template
- How to check custom fields from functions.php
- Override edit_custom_walker.php to conditionally show input depending on menu position
- Custom Field select list is truncated
- Getting content from custom fields of different pages on a single page
- Decouple page name from page title
- How do delete a meta key?
- Add custom fields to specific menus
- Add CSS class to posts with certain meta key
- Conditionally get ACF field in WordPress nav walker based on parent menu item?
- Advanced Custom Fields: how do I check to see if a value is set in an field? [closed]
- WP_Query – Order results by meta value
- Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
- getting all values for a custom field key (cross-post)
- Custom query with orderby meta_value of custom field
- How to filter post listing (in WP dashboard posts listing) using a custom field (search functionality)?
- Using meta query (‘meta_query’) with a search query (‘s’)
- Can I exclude a post by meta key using pre_get_posts function?
- Add validation and error handling when saving custom fields?
- Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
- Show Custom Fields in Quick Edit
- Where are custom field values stored in the database
- Validating Custom Meta Box Values & Required Fields
- Max length of meta_value
- wp_nav_menu: show menu only if one exists, otherwise show nothing
- Add custom fields to wp native gallery settings
- How to fix missing custom fields after upgrading to WordPress 4.8.1?
- How can I add extra attribute in the ‘Page Attribute’ section in wp-admin for pages?
- Is there a way to set default custom fields when creating a post?
- Custom post meta field effect on the performance on the post
- How to get custom post meta using REST API
- Custom field/meta populated by dropdown of existing posts?
- Difference between meta keys with _ and without _ [duplicate]
- Is there any action filter/hook for validating a custom field before publishing the post?
- Apply the_title() filter in post & page title, but not in menu title
- Get the ID of the page a menu item links to?
- Remove Dimension from wp_get_attachment_image
- Orderby meta_value only returns posts that have existing meta_key
- Underscores in custom fields
- What is the index [0] for on post meta fields?
- What is “meta_input” parameter in wp_insert_post() used for?
- Change the_title() of a page dynamically
- Query Posts or Get Posts by custom fields, possible?
- How to enable revisions for post meta data?
- Sortable Custom Columns in User Panel (users.php)?
- Any way to add custom options to Gallery Settings?
- The “_encloseme” Meta-Key Conundrum
- ORDER BY custom field value
- Individual Widgets per Page
- Add subtitle to Woocommerce product title
- Best way to programmatically remove a category/term from a post
- Importing data for advanced custom fields plugin?
- Gutenberg add a custom metabox to default blocks
- SQL Query to copy value of a meta_key into another meta_key
- ‘Preview Changes’ for custom meta boxes?
- Using TinyMce with textareas in meta boxes on custom post types
- Filter WP_Query for posts having a certain meta-value
- How to correctly call custom field dates into a posts_where filter using SQL statements
- Using get_post_meta with new_to_publish