micasuh
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Upgrading multiple, individual WordPress installationsI think a non-subversion option to upgrade would be amazing as well. I am in the same boat as you, MACscr.
If there was a way to trigger the upgrade script on each blog all in one shot, it’d make life so much better. One major problem, however, would be the slow connection speed of opening up simultaneous ftp or ssh connections at once then running multiple simultaneous upgrades on one server.
The whole thing would have to be more than just a plugin, however, because that still means you log into each WP installation and upgrade individually.
Forum: Fixing WordPress
In reply to: How to change the index page of your siteMkhululi,
home.php is an a former template file that was discontinued around version 2.5. If you have home.php in your template, it will overtake the functionality of index.php. You’ll have to rename home.php to another name in order for your setup to work.
Forum: Plugins
In reply to: Exporting wordpress posts into a google calendar ?I hope someone sees this because I could seriously use this functionality right now!
Forum: Fixing WordPress
In reply to: remove space from top of source codeWell, I resolved my problem!
What I did not know and could not find any information about is that it’s not good to have any spaces in functions.php. I’ve seen talk about this with other people but it wasn’t specific.
If there is any space between php requests, that can break the feed since somehow it inserts a space in the templates after rendering.
For example, if you have several php requests that are opened and closed, they should be right next to each other. Such as this:
<?php foo ?> <?php foo ?>
If it looks like this:
<?php foo ?> [extra line break here] <?php foo ?>
it’ll break because of the extra line break in the middle of the php requests.
So always put php requests right next to each other. Your theme and feed will thank you!
Forum: Plugins
In reply to: [Plugin: NextGEN Gallery] Insert gallery into home.php template fileSo I viewed this thread thinking it was the solution:
https://www.ads-software.com/support/topic/261872After lots of testing, I was frustrated. I finally saw another suggestion and added my comment to the above thread.
Use this code in any template file and it should work:
<?php echo do_shortcode('[nggallery id=x w=width h=height]'); ?>
Forum: Plugins
In reply to: [Plugin: NextGEN Gallery] Insert Gallery into template design codeI had problems with this version of the do_shortcode:
<?php echo do_shortcode('[slideshow id=x w=width h=height]'); ?>
So, after looking around more, I found that the correct version of this code should read like this:
<?php echo do_shortcode('[nggallery id=x w=width h=height]'); ?>
For some reason, slideshow didn’t work and nggallery did. This is an FYI for others who suffered my pain!
Forum: Plugins
In reply to: [Plugin: NextGEN Gallery] Head elements on gallery pages only?I actually don’t know how much load weight it reduces. But because the extra JS and CSS files only appear on certain page or pages, you have several fewer requests to be made on those pages which incrementally increases load times for pages. The less requests a page makes, the faster the page loads.
There’s gotta be a way to put a lot of this into the functions.php file but I have no clue where to begin with that. I hope someone will add to this post and let us know what to do!
I wish fix-rss-feed worked for me but it did not. Here’s my feed which is broken:
https://www.stopthethyroidmadness.com/feed/I’ve tried to copy and paste the same feed code from another successful site’s feed. I’d appreciate any advice.
Here’s the whole page worth of code. I really hope someone can educate me!
<?php if($post->post_parent) { $parent = get_post($post->post_parent); if ($parent->post_parent) { $children = wp_list_pages("depth=1&sort_column=menu_order&title_li=&child_of=".$parent->ID."&echo=0"); } else { $children = wp_list_pages("depth=1&sort_column=menu_order&title_li=&child_of=".$post->ID."&echo=0"); } } if ($children) { ?> <h3>Related Programs</h3> <ul class="moreInfo"> <?php echo $children; ?> <?php if (is_page()) { //we're looking at a static page. Which one? if (is_page(5) && $post->post_parent) { // Children's page and subpages ?><li class="page_item"><a href="https://www.terraceumc.org/category/children">Children's Upcoming Events</a></li><?php } elseif (is_page(6) && $post->post_parent) { // Adult page and subpages ?><li class="page_item"><a href="https://www.terraceumc.org/category/adults">Adult Ministries Upcoming Events</a></li><?php } } ?> </ul> <?php } ?> <!-- End Related Pages --> <h3>What's News—</h3> <ul class="events"> <?php if (is_page()) { //we're looking at a static page again. Which pages? if (is_page(array(5, 1752, 1768, 1749, 1764, 1775, 1754, 89, 1758)) && $post->post_parent) // Children's page and subpages query_posts('cat=20&posts_per_page=10'); elseif (is_page(array(6, 630, 1878, 1882, 779, 1880, 1884)) || $post->post_parent) // Adult page and subpages query_posts('cat=62&posts_per_page=10'); else query_posts('cat=12&posts_per_page=10'); } while(have_posts()) : the_post(); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endwhile; ?> <li class="all"><a href="<?php bloginfo('url'); ?>/category/events/">View All Upcoming Events</a></li> </ul>
I’m confused why this worked but when I added the parent page as a child to another page, everything kicked in correctly. I’m confused why it wouldn’t show these elements when this page is a top level parent page. That’s ultimately what I need to happen here.
Forum: Plugins
In reply to: [Plugin: NextGEN Gallery] Head elements on gallery pages only?Now if only I could put some of this code in the function.php file, it wouldn’t always be overwritten everytime NextGEN is updated!
Forum: Plugins
In reply to: [Plugin: NextGEN Gallery] Head elements on gallery pages only?Take out all instances of
<em></em>
from the above code and it will work.Forum: Plugins
In reply to: [Plugin: NextGEN Gallery] Head elements on gallery pages only?An alternative way to minimize the impact of NextGEN scripts and stylesheets from loading into wp_head is by adding the if_page variable into the function load_styles() section.
Replace:
function load_styles() { // check first the theme folder for a nggallery.css if ( nggGallery::get_theme_css_file() ) wp_enqueue_style('NextGEN', nggGallery::get_theme_css_file() , false, '1.0.0', 'screen'); else if ($this->options['activateCSS']) wp_enqueue_style('NextGEN', NGGALLERY_URLPATH.'css/'.$this->options['CSSfile'], false, '1.0.0', 'screen');
with
function load_styles() { // check first the theme folder for a nggallery.css if ( is_page(<em>xx</em>) && ( nggGallery::get_theme_css_file() ) wp_enqueue_style('NextGEN', nggGallery::get_theme_css_file() , false, '1.0.0', 'screen'); else if (is_page(<em>xx</em>) && ($this->options['activateCSS']) ) wp_enqueue_style('NextGEN', NGGALLERY_URLPATH.'css/'.$this->options['CSSfile'], false, '1.0.0', 'screen');
where the value xx equals the page number where the gallery is loaded.
Adding the conditional tag if_page allows you to specify for which pages this code needs to be applied. If you wanna do an array of pages (more than one page), make it look like this:
(is_page(array(<em>xx, yy, zz</em>)))
where xx, yy, and zz are three different pages. List as many pages as are needed.Remember to add the necessary open and close parentheses () in order not to break the PHP.