Try
if ( isset($_GET['activated']) && $_GET['activated'] == 'true' || isset($_GET['preview']) && $_GET['preview'] == 1 )
instead of
if ( $_GET['activated'] == 'true' || $_GET['preview'] == 1 )
Edit:
You should wrap the if-sentence in the functions.php file into a function and a relevant hook. Here is an example using the after_theme_setup
hook:
add_action('after_theme_setup','my_theme_setup');
function my_theme_setup(){
if ( isset($_GET['activated']) && $_GET['activated'] == 'true' || isset($_GET['preview']) && $_GET['preview'] == 1 ){
ddthemes_setup();
}
}
Related Posts:
- Adding a text domain to every __(), _e() and __n() gettext call without a plan to create own translations
- Can we completely remove the WordPress Sitemaps (WordPress 5.5)?
- Update Multiple Post Meta for the Same Post In One call?
- How do you remove plugin edit option?
- WooCommerce get_price returning wrong price when used via ajax
- Open Post Thumbnail in New Child Theme File in WordPress
- wp_get_post_terms is difference obj model than the one in rest api response
- What are the specifics of WordPress development I need to know? [closed]
- WordPress shows error related to allow_url_fopen
- Redirect to another page using contact form 7? [closed]
- How to show the number of website visitors in my theme
- Redeclare function after plugin activation
- WordPress custom post type image in RSS
- Inserting Plugins Into Blank Space of Externally Designed WordPress Theme
- Code for unique user visit count on every page WordPress
- woocommerce remove coupon link does not work
- need to find duplicated meta value in custom filed and view the posts that have the same value
- how to display recent post by category on home page
- Newbie problem with adding include wp_footer
- How can I find related learndash course id from woocommerce product object?
- Submitting form to PHP
- Rename a folder via HTML POST request
- How to get a post views count using ‘WordPress popular posts’ plugin
- How can I see $post object in frontend from functions.php?
- How much PHP and MySQL or MariaDB knowledge should I know to start writing WordPress themes and plug-ins and whatever else a beginner can edit?
- Change Jobs for WordPress templates
- How to copy data from user profile page (profile.php) to theme customizer
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- How to create post comparison in wordpress
- Uncaught Error: Call to undefined function wp_generate_attachment_metadata() @ wp-cron
- Using require_once in a Plugin?
- Simple form that saves to database
- How to call “page specific menu items” in template [closed]
- How to call plugin path in JS?
- Create WooCommerce Product Category Programmatically
- Get Current user email as a return string value
- Stackoverflow type of badge plugin giving warnings in WordPress 3.5
- How can I make content disappear when a user logs in?
- Plugin.php: PHP Notice: Undefined offset: 0 in
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- New Plugin: Post update pushes a copy as a revision
- gallery option is not available in media upload box in costum theme option page
- Network: retrieve a list of latest posts
- WordPress on AWS with ELB
- Executing my function once on a specific time
- How to access data in wordpress database externally using php
- how to add a button next to the wordpress view button?
- WooCommerce: Building a page with user input which is used to query order status and external API and return a result
- Why “Call to a member function on a non-object” in plugin only?
- How to create a code editor for my plugin .?
- After upgrade to php 7 plugin/them updates broke [closed]
- How to echo text in browser instead of download junk file?
- WordPress 4.8.1 php getting commented
- Issue running db create table query from static method
- Allowing users to Sign-up > Login > Post articles that need approval
- Use $variable from file1.php in file2.php (different file paths)
- Woocommerce singe product custom gallery output works just on the first slide
- How to include a custom field in the woocommerce email?
- Remove Pagination for Product Category Pages WooCommerce
- All custom widgets are not showing in widget area at the same time
- How can I use my custom wordpress theme on two websites? [closed]
- Adding a simple Javascript file with a plugin
- Wierd site output [closed]
- How to write to a separate PHP file in plugin settings
- Dynamic Image Replacement through call rail phone call tracking plugins in wordpress
- How can I show registration form inside modal?
- How to add custom function to pluggable.php
- WooCommerce – new order email hook
- How to list datas from database in a topic?
- Editing a coupon generating plugin
- How to hide an option from dropdown in filter module
- How use wp_insert_post and add og:custom tags?
- Display pagination in reservation Plugin and and Print table as pdf
- How to change “Read More” text?
- How to change a wordress plugin php code in my child’s functions.php file?
- What is the right way to populate a dropdown from MySql?
- Woocommerce – Change variations output
- WordPress Plugin PHP Not Calling Function
- load plugin in code snippet
- Is admin section completely customizable in terms of styling?
- When the user entered an unauthorized url redirect to login page
- Creating Admin Submenu Page via Class Method
- Get plugin to background of page
- How to create a dashboard for logged-in users with custom functionality? [closed]
- Cannot access variables within a widget
- Postal address auto-complete on profile page
- WordPress Related Plugin – Adding an image
- ACF: Hide a div or template section when a custom field (in a field group) is empty
- How to delete remain data in WP database after deleting custom post via admin interface
- Populate Woocommerce order notes with custom field value
- Woocommerce Product Add-ons – Auto-select first option
- Strict Standards: Non-static method in sidebar generator
- Fast Tranfering my WordPress site to another server
- Duplicating wordpress install issue
- Meta box not displaying on the plugin page
- Warning: Undefined variable $admin
- public custom posts not showing in my wordpress plugin
- Getting error when accessing Customizer Page
- I want to allow certain file types on dokan upload files
- How to create different woocommerce single_product.php pages for each product? [closed]