Yes, that’s good.
You can be a little safer using <?php if(current_user_can('manage_plugins') ); ?>
Related Posts:
- how to create a conditional content_width for a wordpress theme?
- How to hide and content from auto-generated excerpts?
- How can I detect hierarchal relationships beyond children (grandchild, great-grandchild, etc)?
- Where do you add code in custom fuctions so it works on a specific page?
- If user is logged in and has a role echo statement
- Why is the `if else` not working?
- hide/show a div in wordpress
- Conditional loop based on current page
- Checking conditionals
- Is there a has_more_tag() method or equivalent?
- Hide a div that is part of all pages on one specific page
- Editing the custom background CSS
- How to force Media manager to overwrite files of same name?
- What is a good way to pass a variable from add_action to a Theme?
- Why does my short code get executed before other content?
- Enabling Widgets By Default in Custom Theme Development
- How to fix the error “file_get_contents was found in the file functions.php”?
- Identifying the priority of style.css so I can make a small CSS file load last
- WordPress Customize — Move “menus” options / field to another section
- How to use the responsive images feature from WP 4.4 in your themes
- What are WooCommerce starter themes? [closed]
- How to disable the gradient and font size internal CSS added by WordPress when using theme.json
- Modifying JS files in Child-theme
- Custom CSS In Uploads Folder
- Default header image does not display
- Adding wp_enqueue_media(); causes problem
- A guide or tool for inserting bootstrap in underscores theme? [closed]
- What is the correct way to do a mobile theme for WordPress?
- What is the right way to make custom main page?
- .sub-menu or .children?
- Custom CSS without css.php file
- Script only partially runs on theme activation, but runs fully on deactivation?
- How to echo category_description() without stripping out html tags?
- Understanding WordPress(framework?) Web Development
- For best DB performance should I serialize all theme options together or by type?
- Stylesheet not linking
- How to control layout of posts on page?
- saving row as a template using WPBakery Page Builder is not working [closed]
- Non-Blog Website without Search: are comments.php and search.php in theme still required?
- Custom metabox for custom page template
- Display recent posts with thumbnail
- Custom Widget options in theme
- Include Parent functions.php in Child Theme functions.php
- Redirect to specified page when insufficient permissions?
- Primary navigation menu & footer not showing in category / tag page
- Jetpack Comments with fall-back
- wp_script_add_data doesn’t seem to work
- Exclude read more in the_excerpt [closed]
- Where am I doing wrong in my theme menu?
- Calculate data and passing to Theme
- How do I turn a post thumbnail into a background image?
- Alternative to file_get_contents() for theme operations
- How can I add custom text styles to the visual text editor?
- Getting Different Size Of Attachment Images
- 2 loops, is_home won’t work, count is off
- how to remove the gallery shortcode in wordpress?
- What PNG Fix script do you recommend for IE6?
- How to show specific post meta?
- wpautop on section
- Are seven additional image sizes are too many?
- Show specific category posts on Genesis framework home page
- registering a global template wordpress 6.0
- How do I use wp_nav_menu?
- How to add InnerBlock multiple times in the same block
- Assign custom classes to the divs inside the loop
- How to clean up the theme for production?
- Questions from a new WP Dev [closed]
- Proper way to move a Bootstrap site to WordPress [closed]
- Theme development: How to add CSS classes to menu items?
- How to conditionally add a wp_filter
- HTTP Error when uploading images over specific dimensions
- How do I assign a particular post to a particular page in WordPress?
- Rolling your own WordPress Themes
- PHP Parse error: syntax error, unexpected ‘endwhile’ (T_ENDWHILE), expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) on line 124
- how use ajax to custom page template
- Posts Page shows Classic Editor interface not Gutenberg
- Comment Form Development Issue
- Removing element from DOM with jquery through plugin Custom Scripts for Customizer
- hide theme files for admin beneath root
- How to load jQuery with Ajax in WP version 5.3.2?
- Recall translations made with Poedit
- WordPress menu walker – Get parent item text inside end_lvl function
- WordPress Ajax Spitting out a page as a response?
- Filter URL and shortcodes from the_excerpt
- Check if redirected from a specific page template
- Postname permalink page not found error
- After theme change the menus have to be manually linked to the corresponding theme location
- What’s the policy for building a theme that doesn’t support widgets/menus?
- Incorporate zilla shortcode into theme
- Passing a location-dependent array via wp_localize_script within a shortcode
- Import/Export WordPress demo
- Global Navigation menu in diiferrent wordpress setups
- getting id of page
- How to make a sticky footer?
- How can i display a 4 diferent themplate for the archive page
- Does a custom WordPress theme require updates to it’s source code?
- New directory created each time I upload new theme zip
- Align images to the left of the content
- WordPress theme.json: Why doesn’t “contentSize” work
- WooCommerce custom add to cart buttons does not add products to cart if you’re logged out