You need to check against the value of layout
:
if ( get_theme_mod( 'layout' ) === 'stream' ) {
// Stream
} elseif ( get_theme_mod( 'layout' ) === 'grid' ) {
// Grid
} else {
// Fallback
}
Related Posts:
- Custom Loop Pagination on WordPress
- delete an array element when its date expires
- Infinite-Scroll Plugin and Jetpack Infinite Scroll Plugin – Adding to “Thoughts” Theme
- I’m trying to create an array with a foreach loop, but the array only stores the last item [closed]
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- How to Fix an Archive.php That Displays All Posts?
- pagination broken – clicking next displays “page not found”
- update_user_meta as multiple value but with same meta key
- Adding new divs with custom classes to products on WooCommerce shop page [closed]
- Pagination on Custom Loop
- why is this content-template not showing any of my blog-entries?
- Woocommerce linking variations
- fetch from an external api call and display results in page
- Add More Featured Data Not Sending to Database
- Using foreach loop breaks
- Cannot display or echo alt text on featured image
- Using Advanced Custom Fields to create a per page slider
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- Split loop into two columns, how to favor one side over the other
- WordPress Search Results for Multiple Post Types
- Accessing data from a non-WP database/table within a page content
- WordPress blog post url on category page
- WP dynamic featured image – Can’t get second featured image url
- Converting HTML Template to WordPress Theme
- Extending the WP_Widget_Text class
- Dynamic Stylesheet loads but doesn’t finish
- Filter Select results based on selection
- Using loop pagination on single.php
- Loop with slider (slider not loading)
- Selectbox in admin panel function linking to CSS
- How to hide all child pages with post_query?
- How to sort posts based on the value (number) of a post’s metadata?
- Can I install/embed WordPress on a ‘single page’?
- Show css depending on activity type in BuddyPress activity-loop [closed]
- Why my filterable portfolio page work not perfectly between slug button and slug output WORDRPESS?
- How to check if a meta value has already been assigned to any user?
- How to hide products that do not have an image from a slider carousel for an ecommerce webpage?
- Customize Theme comment template to Insert VoteUp and VoteDown buttons
- filter default query to show just selected level of child pages in wordpress
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- Trying to build simple deposit code that hooks into woocommerce
- How to pick the default selected value in wordpress dropdown?
- Iterate through posts based on array of categories
- get author_name from queried post
- Displaying Woocommerce Product Category in WordPress
- Add New User, extra fields which are required?
- user_profile_update_errors hook not executing
- Send an email to specific adress when button is clicked?
- How can I add extra word in permalink when someone click download button?
- Customizer: active_callback and sanitize_callback incompatibility?
- Saving and Restoring a Canvas on A Individual User Basis
- Redirect specific user role to specific site after login?
- Send multiple attachments with wp_mail in PHP
- WordPress admin pointers tour bug?
- Increase offset while looping
- custom url rewrite for wordpress
- Extend plugin Class through functions.php
- Blog posts repeat
- How to add condition in wordpress loop? [closed]
- Woocommerce : Can’t get product info in loop
- How to add a do_action on refreshing of WP customizer?
- How to set variable, pass it to a partial file and remove it after?
- how to refresh div on template part?
- Customize position of social icons in upme plugin [closed]
- Weird 404 URL Problem – domain name being placed at end of urls
- How to get the value of input hidden html from text editor to custom page template?
- Make a list of sites for each user in WPMU – switch_to_blog (display in SITE_ID: 1)
- Alert Bar section within WP loop is displaying even though there are no posts
- Menu jumping when calling it via PHP
- remove post that has no content
- Output Video Download Link in template
- Display category name only once inside loop
- Modify custom field input data before creating a new post
- Output custom field value to post string
- Can’t find infinite loop cause
- Checking array against author id in loop
- How do I Turn This Into An if statement?
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- Using $wpdb (WPDB class) ‘replace’ with multiple WHERE criteria problem
- Media Upload , file name changed automatically
- Replace shortcode in substring
- Custom posts in different columns style
- Load wordpress content in other domain
- How Can I use WP_Query to Only Display 1 Post from Custom Post Type if Query Returns Posts with Matching ID in Custom Field
- Checkbox doesn’t stay checked, conten
- Need help enqueueing webfonts
- need help with existing code showing subpages
- How do I add a custom css to all posts without affecting homepage css? [closed]
- how to show only specific category for a template
- Custom Background by Page IDs
- post thumbnail, conditions, else wont work
- Widgets in the loop if active
- List posts that don’t have a specific tag?
- Changing the_posts_navigation() html output
- Can we count the WordPress Loop
- Get post id within comments loop
- Advanced Custom Fields not displaying
- How to get private property in parent class into extended class?
- How to obtain the current website URL in my theme?
- Syntax error when I try to insert my loop into an unordered list? [closed]