zonerdck
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin Name: Device Theme Switcher] Device = TrueYou could also uses wp_get_theme(); to make a conditional statement based on the theme being used.
Forum: Plugins
In reply to: Nicer permalinks with nextgen galleryHeres what I did. First create a pictures page in wordpress then create a single album. Load that album on the pictures page. Put all your gallery’s in that single album. Then if you go into manage gallery it has an option to create a new page do this with every album and make sure the page you make is a sub-page of the pictures page created earlier. This should get you a page structure like this “www.testsite.com/pictures/album/” at this point you will need to type this into the url to make sure it worked. Then all there is left to do is change the links on you main pictures page to point to your subpages instead of the usual gallery pages. In the file /plugins/nextgen-gallery/view/album-extend.php you edit the link to the appropriate one I used the title tag already made to make the link. Isn’t perfect but gets the job done.
Forum: Fixing WordPress
In reply to: Robots.txtUpdate to that last post the actual robots.txt comes from /functions.php file in the /wp-includes/ folder.
Around line 1714 you will see this code…
function do_robots() { header( 'Content-Type: text/plain; charset=utf-8' ); do_action( 'do_robotstxt' ); if ( '0' == get_option( 'blog_public' ) ) { echo "User-agent: *\n"; echo "Disallow: /\n"; } else { echo "User-agent: *\n"; echo "Disallow:\n"; } }
For my final working robots.txt file I used this but you can feel free to change the directories to suit your needs…
function do_robots() { header( 'Content-Type: text/plain; charset=utf-8' ); do_action( 'do_robotstxt' ); if ( '0' == get_option( 'blog_public' ) ) { echo "User-agent: *"; echo "\nDisallow: /wp-admin"; echo "\nDisallow: /wp-includes"; echo "\nDisallow: /wp-content"; echo "\nDisallow: /stylesheets"; echo "\nDisallow: /_db_backups"; echo "\nDisallow: /cgi"; echo "\nDisallow: /store"; echo "\nDisallow: /wp-includes\n"; } else { echo "User-agent: *"; echo "\nDisallow: /wp-admin"; echo "\nDisallow: /wp-includes"; echo "\nDisallow: /wp-content"; echo "\nDisallow: /stylesheets"; echo "\nDisallow: /_db_backups"; echo "\nDisallow: /cgi"; echo "\nDisallow: /store"; echo "\nDisallow: /wp-includes\n"; } }
Forum: Fixing WordPress
In reply to: Robots.txtFor those of you using Google XML Sitemap generator. You can add onto the sitemap by adding some code in the sitemap-core.php file for this plugin.
Around line 3151 you will see this line of code
echo "\nSitemap: " . $smUrl . "\n";
This adds the sitemap to the robots.txt file What I did was ad this code to allow all robots for now which once completed your code should look like this.
echo "\nUser-agent: *"; echo "\nAllow: /\n"; echo "\nSitemap: " . $smUrl . "\n";
You can add as much content as you want from there.