Per the WP Codex, you need to be sure you are passing the directory and file:
<?php
If (is_plugin_active('plugin-directory/plugin-file.php')) {
//plugin is activated
}
?>
Related Posts:
- Import WordPress XML File from Within Functions.php
- How to manually activate user in dashboard only by admin
- What is the correct way of updating wordpress options
- register_activation_hook for multiple functions
- Adding a second email address to a completed order in WooCommerce [closed]
- Possible to search by author name with default WordPress search function?
- Advantages and disadvantages of using automatic-feed-links
- Breadcrumbs showing Parent and Child Pages
- Influence of WordPress functions on site speed
- Is it possible to override this function/class in a child theme?
- When new user register then add new user role
- Change meta tags programatically
- Convert hyphen to underscore in permalinks
- Remove bulk actions based on user role or capabilities
- Set first oembed in post to a global variable or function
- Adding extra SVGs to TwentyNineteen child theme using class TwentyNineteen_SVG_Icons
- Use a function to update post meta based on other post meta
- wp_delete_attachment
- Adding body class when post contains a specific shortcode
- Displaying Widgets
- WordPress registration and contact form 7 [closed]
- Display WooCommerce subscriptions for user [closed]
- How to preserve edits to Name or Slug of term when using wp_update_term on save?
- Woocommerce checkout field maxlength, make input number field only (postcode)
- My simple custom shortcode is not longer working (possibly due to upgrade to WordPress 4.4 ?)
- PHP files included in functions.php don’t seem to work
- how to add an image to the footer?
- How to properly add function called by action-hooked function to functions.php?
- Get Current User info using wp_localize_script, in functions.php
- How to add new embed handler not supported by oembed?
- How do I permanently Disable Attachment Post URL
- Need to add class=”lightbox” for every single post image
- Child Theme files – what is needed?
- How do I add Bootstrap and LESS to my migrated WordPress site?
- Stuck on maintenance mode
- Publish/Update post is changing image links from file url to post url
- How to display custom option field in woocommerce orders in admin panel?
- Best practices regarding the creation of custom widgets?
- Multiple Loops Meta Data
- Update user meta of author when post content is viewed
- Don’t display html if function returns nothing
- If ACF field is empty show different value [closed]
- What is the text that appears beside the page titles in the list of pages in the WP admin?
- How i can put $_GET codes in function.php?
- Is there a way to direct unregistered user to registration page when click a link?
- Auto log in hook is requiring a page refresh
- How to stop media_sideload_image from running when deleting a post?
- I want to display latest post in marquee [closed]
- Add php code to wp_print_scripts?
- How to get an attachment id from a filename
- how to get the post ID from wp_insert_post
- Remove ‘page-numbers’ class from prev and next tags
- Possible to merge these two functions?
- How can I set the SRC URL of the custom logo image?
- The Capability to choose post/page template
- The_content and Preg_replace in loaded Iframe [closed]
- dynamic site link for future migration in echo do_shortcode()
- How to make custom comment fields required
- Include Jquery libraries in wordpress theme?
- WooCommerce -> wc_enqueue_js not working [closed]
- Use existing image sizes for WooCommerce
- Add a mature content warning to first-time visitors
- Retrieve First Image Function
- User meta and public function security
- Show Featured Image in else statement
- Any adverse effects of adding apply_filters to a function?
- How can I remove page titles without removing the link in the navigation bar in twentyeleven?
- Simplest Way to Build Custom Archives Page?
- Filter for replacing the WP_query object for a given category
- Custom user role still showing up after deletion, ideas?
- How to get taxonomy tree ids without running expensive loops
- wordpress built-in Jalali date convertor
- Change WooCommerce Payment Options From Radio Buttons to Dropdown Menu
- WordPress Function Assistance with Loop
- Populate acf-field, depending on block name
- Add Change role button for list of user in an event
- Set URL Parameter Post Layout As Default
- Exclude admins from query get posts
- I am trying to set post terms to a custom taxonomy
- Classic TinyMCE messing up only Contributor’s HTML
- Reference multiple style sheets, clearing styles for permalink page, custom fields for css
- How to add publish/draft button in Admin Post Lists
- Add schema to Search result page’s body. Tried using is_search
- Show users last read posts for each user?
- Woocommerce – change order status from on-hold to pending payment
- Disable links to images only if link is an image
- Sending Messages Back to the Template After Processing?
- Shortcode to eliminate and replace with
- WordPress Javascript Widget jQuery Dependency Issue
- Allow tags and attributes in post and pages content
- using enqueue_script in a shortcode isn’t working
- Syntax for a function in order to get post’s title in JSON encoded response [closed]
- Comment Function
- Filter to strip unnecessary attributes
- Will my WordPress site become vulnerable after adding this functions which allows more HTML tags for subscribers?
- Add product to cart from functions.php
- get_post_class() not working well
- Get all users from role and add to dropdown (select) – wordpress, javascript
- Add functionality to block comment authors in the Comment edit pag
- WordPress enque the same script causes the setInterval not to work