How to set two different themes on one WordPress? (Desktop vs. Mobile)

To employ two entirely separate themes is a suboptimal architectural approach. Themes are activated site-wide/globally and not on a per-user basis. You don’t want to change the current theme constantly. While I personally really dislike this option, WordPress ships with a function that sniffs the UA-String, wp_is_mobile. This function can be employed to either output … Read more

How to create a live demo page for a theme? [closed]

This is how I would do it in a plugin: Install WordPress as a multisite with subdomains. Use the main site for the theme shop, install Easy Digital Downloads or another shop plugin. Create a product for each theme, make sure the slug matches the theme directory name. Upload your themes. Write an empty function … Read more

Add a page outside of the current theme?

Edit: Updated with the added context from your comment. You could do this with a custom Page template. In your theme, create a new file. In this example, my theme will be “mytheme2015,” my new file is “template-holiday-card.php”: in wp-content/themes/mytheme2015/template-holiday-card.php <?php /** * Template Name: Holiday Card */ Now, once you have that template file … Read more

Check php version before theme activation

As you want to implement the check within your theme files you can use the action after_switch_theme; as you can guess this will activate your theme to perform the check but will switch back to the previous theme if necessary. If the requirements are not fulfilled we’re going to notify the user via an admin … Read more

Editing Links in the Footer of WordPress Themes with Base64 Encrypted Code?

Well, this is the output from that function: ?> <div class=”clear”></div> </div> <!– /Main –> <!– Footer –> <div id=”footer”> <?php the_time(‘Y’); ?> <?php bloginfo(‘name’); ?> . WordPress . <?php if(is_home()) : ?><a href=”http://wordpressthemesforfree.com/” title=”Wordpress themes”>Wordpress themes</a><?php endif; ?></div> <!– Footer –> </div></div></div> <!– /Page –> <?php wp_footer(); ?> </body> </html> <? So, if you … Read more

Editing the custom background CSS

Yes, that is possible. Take a look at the codex and you will see that you can pass arguments with add_theme_support( ‘custom-background’). One of them is the callback function that generates the <style> tags: _custom_background_cb. You can pass your own function as an argument to add_theme_support. Here is the code of the original function (retrieved … Read more