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)
- When to use add_action(‘init’) vs add_action(‘wp_enqueue_scripts’)
- Change admin bar to default:off
- How to add Color Picker in Theme Options for the following?
- Template for individual post designs
- Theme Review: post thumbnail, header image, content width
- How to determine if a category is empty?
- The seventh parameter passed to add_submenu_page()
- What would happen if the admin installs a plugin when the plugin is included in the theme?
- How do I get my child-theme to work with my theme’s includes folder?
- wp_insert_post breaks rewrite rules
- Where can I find a good reviewed collection of Twenty Ten child themes?
- Template Hierarchy for get_header()
- Remove frameborder attribute from iframes
- how do I get a sidebar’s id or number for use with is_active_sidebar()
- Looking for the code in twentyten that allows users to select images for the header/banner
- WordPress as a data intensive web app
- How to determine which custom header image is being shown
- using wordpress without javascript
- Theme Check: Could not find post_class
- Override theme programmatically
- can’t understand _e function well
- WP 3.1 upgrade breaks AutoFocus+ theme
- Comment entry screen shows even though “Allow Comments” is unchecked
- Change content layout based on menu hierarchy
- Theme Loading Into Dashboard
- How to make theme elements customizable in wordpress?
- How to obtain a reference to the_excerpt() from custom loop
- defining a folder location in order to recall it
- JavaScript stops working on selectively refreshed sections one inside the other
- Why doesn’t my css work when I check my theme on mobile devices? [closed]
- Changing Header Image Every N Minutes/Seconds
- My website is not responsive on mobile devices
- underscores use of the article element on the page template
- Ideal inline dynamic CSS injection
- How to create and populate with few links a menu in child theme functions.php?
- Plugin does not work in custom theme
- How to Manually Code Shortcode?
- Making custom woo themes
- Where does the uploaded image go?
- Change Header Image on Blog Post for Mobile View
- Previous and Next links not populating, have I missed something?
- Single.php the_excerpt loads same as the_content not loading read more line
- Where to put custom page templates in theme?
- How to fix WordPress images not showing up in local hosted XAMPP server?
- Let user to add input fields on theme option page
- .current_page_ancestor broken in Twenty Eleven
- MapPress Easy Google Map in Jquery Tabs Problem
- Homepage slider not using correct images
- WordPress theme header.php should I add title meta?
- Problems with cart and pages on _s theme
- Creating a Single Page Theme correctly
- Custom post type query with pagination doesn’t work
- Fatal error: Class WP_Customize_Image_Control not found
- Edit Product Archive design for Woo theme
- How do I remove header/page-title image in farvis theme? [closed]
- Which theme PHP file should be edited in order to change Posts appearance
- Necessary css classes to be included in theme stylesheet
- How to link post image to post link?
- How Does One Create a Global Variable Repository
- Passing a location-dependent array via wp_localize_script within a shortcode
- Retrive posts thumbnail in original size
- How can i display a 4 diferent themplate for the archive page
- Add text when displying attribute with a hook on single product page