![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I am currently using the FeaturedContentGallery.com plugin. The script files are pretty big and putting a lot of load on my hosts GPUs. This scripts are only used on the homepage where the the content gallery is but the plugin is inserting them on every page. I found the code that inserts them and am trying to change it to only display on the homepage. Heres the code: ` function gallery_styles() { /* The next lines figures out where the javascripts and images and CSS are installed, relative to your wordpress server's root: */ $gallery_path = get_bloginfo('wpurl')."/wp-content/plugins/featured-content-gallery/"; /* The xhtml header code needed for gallery to work: */ $galleryscript = " <!-- begin gallery scripts --> <link rel=\"stylesheet\" href=\"".$gallery_path."css/jd.gallery.css.php\" type=\"text/css\" media=\"screen\" charset=\"utf-8\"/> <link rel=\"stylesheet\" href=\"".$gallery_path."css/jd.gallery.css\" type=\"text/css\" media=\"screen\" charset=\"utf-8\"/> <script type=\"text/javascript\" src=\"".$gallery_path."scripts/mootools.v1.11.js\"></script> <script type=\"text/javascript\" src=\"".$gallery_path."scripts/jd.gallery.js.php\"></script> <script type=\"text/javascript\" src=\"".$gallery_path."scripts/jd.gallery.transitions.js\"></script> <!-- end gallery scripts -->\n"; /* Output $galleryscript as text for our web pages: */ echo($galleryscript); } ` And heres the code I tried but it didn't work: ` function gallery_styles() { /* The next lines figures out where the javascripts and images and CSS are installed, relative to your wordpress server's root: */ $gallery_path = get_bloginfo('wpurl')."/wp-content/plugins/featured-content-gallery/"; /* The xhtml header code needed for gallery to work: */ $galleryscript = " <?php if is_home() { ?> <!-- begin gallery scripts --> <link rel=\"stylesheet\" href=\"".$gallery_path."css/jd.gallery.css.php\" type=\"text/css\" media=\"screen\" charset=\"utf-8\"/> <link rel=\"stylesheet\" href=\"".$gallery_path."css/jd.gallery.css\" type=\"text/css\" media=\"screen\" charset=\"utf-8\"/> <script type=\"text/javascript\" src=\"".$gallery_path."scripts/mootools.v1.11.js\"></script> <script type=\"text/javascript\" src=\"".$gallery_path."scripts/jd.gallery.js.php\"></script> <script type=\"text/javascript\" src=\"".$gallery_path."scripts/jd.gallery.transitions.js\"></script> <!-- end gallery scripts -->\n <?php } else { } ?>"; /* Output $galleryscript as text for our web pages: */ echo($galleryscript); } ` Any suggestions or solutions? Thanks Grant |
| Tags |
| feature content gallery, plugins |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with Feature Content Gallery | londonmonk | General Discussion | 9 | 08-10-2010 08:59 AM |
| Feature Content Gallery and IE8 | ricksheets1 | General Discussion | 3 | 03-04-2010 01:52 PM |
| What is going on in my feature content gallery. | drplough | General Discussion | 7 | 03-19-2009 06:14 PM |
| Feature Content Gallery | REx | General Discussion | 1 | 01-29-2009 12:47 PM |
| Images not displaying in Feature Content Plugin | fee_m | General Discussion | 6 | 11-19-2008 03:41 AM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us