Using WordPress as piecemeal in existing site?

Can I include content from Pages in WordPress and output that content on any page outside of the WP install directory? Is there something specific I would need to include? You can load WP engine in any PHP file, see integrating WP with your website in Codex. Do I have to use a Theme or … Read more

Jquery in Child Theme

First off, jquery is most likely already enqueued by the main theme. But if not, the proper way is to call wp_enqueue_script(‘jquery’) in a function for the action hook wp_enqueue_scripts. Example: function enqueue_jquery() { wp_enqueue_script(‘jquery’); } add_action(‘wp_enqueue_scripts’, ‘enqueue_jquery’). This code would need to be added to the functions.php file for your child theme. You would … Read more

Moving WordPress.com theme and widget settings to self-hosted site?

First off, check if the theme is available in wordpress.org themes: http://wordpress.org/extend/themes/ If it’s not, find the name of the theme developer and contact them. Many developers of wordpress.com themes are happy for people to use their themes on self-hosted WordPress blogs. The developer’s name and contact details can be found by looking at style.css. … Read more

How can I add a set featured image function to a theme that doesn’t already have it built in?

You can add this line to your functions.php file to add the post thumbnail option to all post types: add_theme_support( ‘post-thumbnails’ ); If you want it for only one post type, you pass an array of post type names as second argument: add_theme_support( ‘post-thumbnails’, array( ‘post’ ) ); #shown in posts only To display the … Read more

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

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

How to see files in directories in “Edit Themes” screen

There is not a way to do this without modifying the core. You should see .php files that are in subdirectories, but you won’t see anything above the root theme directory for .css files, and you won’t see any JavaScript files. If you take a look at wp-admin/theme-editor.php, the relevant lines are… <?php $allowed_files = … Read more