Ricky Irvine
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Get permalink to first child pageGOT IT!
Instead of using
get_childrenI usedget_pages. (Thanks to James Fishwick!)$children = get_pages("child_of=".$post->ID."&sort_column=menu_order"); $first_child = $children[0]; $first_child_permalink = get_permalink($first_child->ID); echo '<a href="' . $first_child_permalink . '">Start Here</a>';Forum: Fixing WordPress
In reply to: Get permalink to first child pageI see. [582] in the above array is not the first element. It is the 582nd element.
Forum: Fixing WordPress
In reply to: Get permalink to first child pageI can’t understand why
$children[0]is returning null. The variable is not empty. This is the beginning of it…array(1) { [582]=> object(WP_Post)#124 (24) { [“ID”]=> int(582) [“post_author”]=> string(1) “1” [“post_date”]=> string(19) “2014-05-06 10:34:17” [“post_date_gmt”]=> string(19) “2014-05-06 14:34:17” [“post_content”]=> string(676) …
How can I grab that first element in the array?
Forum: Fixing WordPress
In reply to: Get permalink to first child pageI’ve got part of it working. The array was written incorrectly. $children
var_dumps the correct page. Now I am having trouble getting that page’s url.$page_id = get_the_ID(); $children = get_children(array( 'post_type' => 'page', 'post_parent' => $page_id, 'numberposts' => 1 )); $first_child = $children[0]; $first_child_permalink = get_permalink($first_child->ID); echo '<a href ="' . $first_child_permalink . '">Start here</a>';Forum: Fixing WordPress
In reply to: Custom fields: if tYou are a gentleman and a scholar! A lifesaver! This is perfect. Thanks so much!
Forum: Fixing WordPress
In reply to: Custom fields: if tI didn’t think about that. But it’d be best to use the same as the second IF statement (“unquoted”).
Forum: Fixing WordPress
In reply to: Custom fields: if tSorry guys, I forgot to finish writing the title of this entry, and now it’s too late to edit.
Forum: Fixing WordPress
In reply to: htaccess to redirect parent-level blog urls to subfolderTo clarify, I need this to happen only on “subfolders”
2007,2008, and2009. Any “subfolder” of those need to be rerouted automatically to their new parent-subfolderjournal.Also solved here: http://wordpress.org/support/topic/242457
Forum: Fixing WordPress
In reply to: NextGEN Gallery: Album sort orderAWESOME THANKS!
You aren’t the only one. I need to do the exact same thing you are trying to do. Please post here if you figure it out. I’ll do the same.
Forum: Plugins
In reply to: [Plugin: NextGEN Gallery] nggallery id not picked up in gallery tagFor what it’s worth, I am having the same problem. I have to put a character after the gallery tag to get anything to show.
Forum: Fixing WordPress
In reply to: Modify wp_get_archives | highlight current archive categoryHow could we make this a custom function, or otherwise a plugin? This is exactly what I needed, but I hate editing the core files.
Forum: Fixing WordPress
In reply to: Big Drop in google traffic after 2.7I can’t think of why 2.7 would hurt your Googles. I’d gather that people used less of the Internets. But, of course, it’s hard to know. Wait it out a few days, I’d say.
Forum: Fixing WordPress
In reply to: Page LinkHa! Oh well… I’m glad you found a solution!