Disregarding for a moment the comments telling you to avoid user agents (because they are error prone and will probably fail on some devices – as you can see from the constant stream of bug fixes on the plugin), the answer to your narrower question is: it doesn’t matter.
If A and B are independent of eachother, as in this case, there is a logical equivalence between if A then if B do C
and if B then if A do C
and if (A and B) do C
.
It could be different if a lot of processing time was involved in checking the user agent and there would be a page condition where you didn’t need a different version for mobile. But as you state it, you always have to check both user agent and page type before you start doing something. Then the order doesn’t matter.
Related Posts:
- Change Image Sizes for Mobile Theme
- How to detect mobile devices and present them a specific theme?
- Is wp_is_mobile() effective?
- How can I set image sizes and still have responsive images using the srcset attribute?
- Excess White Space Above Admin Bar on Frontend Using Twitter Bootstrap
- Featured Image in 4.4 should be larger on mobile device
- How to use the responsive images feature from WP 4.4 in your themes
- how to implement wp_is_mobile on themes?
- What tags should be used for themes to show the type of layout?
- What is the correct way to do a mobile theme for WordPress?
- Free starter theme to make mobile websites? [closed]
- Meta tag viewport
- Can’t show custom post thumbnail sizes as background images
- How does a mobile WordPress theme differ from a simple theme?
- How to make wordpress theme iframe responsive
- Divi – How can we show background video on mobile
- Responsive Images – crop don’t seem to work
- Issue with loading mobile specific custom single page layout in mobile
- Custom image size vs CSS sizing
- Change Responsive Images Maximum Width of 1600px
- Migrating to WordPress – but how will it do “structured” data?
- How do I provide for multiple crops of the same image in a theme?
- Review site using WordPress
- Create theme for mobile phones and tablets only?
- How to hide custom sidebar on mobile
- two col layout bootstrap 4 with one fixed col and fade in effect on image
- add class to all images inside the content
- Menu is in Reversed order
- Responsive Images with art direction
- Reliable method to detect mobiles
- FitVid not working for iframes on particular theme install
- Set start page depending on screen width [closed]
- How to resize video lightbox popup in wordpress? [closed]
- Elementor Pro and Astra have different breakpoints – how to salvage?
- Correct way to make a custom block theme responsive
- Bootstrap 4 mobile menu not working for WordPress Development
- How do I work with responsive images in WordPress? (img srcset/sizes)
- How to add custom css file in theme?
- CSS not updating in browser when I change it
- Display Menu Name using wp_nav_menu
- Get url of thumbnail from the media uploader
- How to: Update live sites theme from version control repo via plugin or library? [closed]
- Adding items to page template dropdown on Page Edit Screen
- How to use logout function on custom menu link?
- Hide certain pages / posts on wp-admin, show custom filter
- use add_action(‘wp_head’) in a widget for generating dynamic CSS styles
- Front End Post Submit Form
- Displaying wp menus by name without using theme locations
- Why does this loop only work on the homepage?
- Nesting Functions within Functions
- Do I really need the div class entry?
- How to determine if post has widget content?
- Custom Script Section Only Echoes Text
- Best way to start becoming a wordpress developer
- Set multiple templates per post
- Place the page title into the short code
- Convert WP Menu to a Drop Down for Mobile browser
- Redirect Old .php URLs to New WordPress Page
- create-guten-block in wordpress theme?
- WordPress navbar with logo in middle [closed]
- Displaying recent post excerpts on static front page
- Which html elements should be styled in wordpress theme
- Theme Customizer not loading JS for live preview
- get_search_form() and aria_label
- Can’t remove DIV from hooks in Storefront child theme [closed]
- Admin: sub menu doesnt display under apperance when activate my themes
- Get data from style.css file and from from users->your profile
- How can I specify that an area of my theme contains widgets?
- How to dequeue css files?
- Extract all shortcode data from post into loop variables?
- wp_nav_menu and its fallback
- Copying the theme style files and images to duplicate the website but with a difference
- reduce duplicate code in wordpress
- How to set Post meta-box defaults based on the choices made by user in Customizer?
- Woocommerce Product attribute not imported with wordpress Importer [closed]
- iPad WordPress theme?
- Adding link post format to theme and permalink to rss feed
- Custom Post Types set up, how do I style the main slug page?
- What are the permalinks options for “Category” base and removing it?
- Designing a custom archive.php inspired by the Autofocus theme
- Is a site with 1,500 pages, (1000 of which are E-Commerce Pages) Too Big to Migrate to WordPress?
- How to get blog-id of an MU site from functions.php
- Does single webpage do not need navigation to create a slug in permalink?
- WordPress theme doesn’t read my translations from pt_BR.po file
- How to get full native language instead of iso?
- Move the social media icons to the left of a WordPress nav menu for Soledad child Theme
- Two instances of the theme folder in the URL
- Advantages/Disadvantages Using Theme Editor Instead of Pages
- Magnific Popup – Add Caption to Images
- Why do WordPress developers use so many opening and closing PHP tags when developing themes? [duplicate]
- 3 x 3 grid of posts on the home page
- Show category and description
- How to update my own theme?
- trying to figure out how to use more that one image upload in the same section in theme customizer
- WordPress custom jquery not found
- Pass custom css class to add_menu_page
- How to force unlink on attached/inserted images?
- Replacing static code in a template file with a sidebar and widgets?
- How to set up a development/staging site to make major changes to the theme then update on the live site?
- What is the point of using the front-page.php template? [closed]