My site looks different when activating new theme

You’re using WP Super Cache; reset the cache for the problem page(s) and it should display the new design. The reason it looks different when you’re logged in is because the static pages are served to Users who are not logged in. Users who have not left a comment on your blog. Or users who … Read more

Resetting Themes Folder to Default

Short answer: No, WordPress does not manage your theme directory, and there is no reset function. There are two important points you should learn from that experience: Always test new software (themes and plugins) in a local installation. Do not just upload something you have not tested before. You could manage the directory or your … Read more

doubled content

The loop in your code: <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> is saying “if I have posts, display them all – by the declared # per page” So you need to modify the loop to only display the content you need. Can you provide some information on where … Read more

Create and style menu

In your theme’s functions.php, write the following code: <?php /* ENABLING CUSTOM MENUS ————————————————– */ //add_theme_support( ‘menus’ ); register_nav_menus( array( ‘primary’=>__(‘Primary Menu’), ‘secondary’=>__(‘Secondary Menu’), ) ); ?> It’ll register two custom menu area for your theme. Then you need to achieve it with in header.php: <?php wp_nav_menu ( array ( ‘theme_location’=>’primary’, ‘fallback_cb’=>”) ); ?> This … Read more

Create a live demo gallery for themes

Solution I used the wordpress-theme-showcaseplugin to show a list of themes in the home page, and to can easily browse the theme that is currently preview I changed the way wordpress handle the permalinks. In the wp-includes/link-template.php file in get_permalink function added this code if(isset($_GET[‘preview_theme’])){ $permalink = home_url(‘?preview_theme=”.$_GET[“preview_theme’] .’&p=’ . $post->ID); }else{ $permalink = home_url(‘?p=’ … Read more

wp query problem

While comparing numbers in meta value use “meta_value_num” instead of “meta_value” ‘meta_value_num’ – Order by numeric meta value (available with Version 2.8). Also note that a ‘meta_key=keyname’ must also be present in the query. This value allows for numerical sorting as noted above in ‘meta_value’. Reference