mcography
Forum Replies Created
-
Forum: Installing WordPress
In reply to: One Website, Two Blogs (not Multisite)?@bemdesign Thanks, that’s what I was thinking. I’ll have to look and see if PowerPress allows feeds to be separated by category.
Forum: Hacks
In reply to: Sort Users by Last Name?Nevermind. I figured it out.
Here’s the code that worked for me in case anyone else is looking to do the same thing. It orders the users by last name and excludes the admin user (my admin has an ID of 14, you’ll need to change that to the appropriate ID for your admin).
/* List Authors Function */ function knapsack_contributors() { global $wpdb; $authors = $wpdb->get_results(" SELECT user_id from $wpdb->usermeta WHERE meta_key = 'last_name' and user_id NOT IN(14) ORDER BY meta_value"); foreach ($authors as $author ) { $user = new WP_User($author->user_id); if ($user->has_cap('edit_published_posts')) { echo "<li>"; echo "<a href=\"".get_bloginfo('url')."/author/"; the_author_meta('user_nicename', $author->user_id); echo "\">"; echo get_avatar($author->user_id,$size='65'); echo "</a>"; echo '<div>'; echo "<a href=\"".get_bloginfo('url')."/author/"; the_author_meta('user_nicename', $author->user_id); echo "\">"; the_author_meta('display_name', $author->user_id); the_author_meta('title', $author->user_id); echo "</a>"; echo "</div>"; echo "</li>"; } }Forum: Fixing WordPress
In reply to: Site Suddenly Stopped Working!How do I figure out which plugin is causing the problem? I changed the plugin folder to ‘plugin_old’ and the site came back up. Then I changed it back to ‘plugin’ and everything was working fine for a minute and then it went down again.
Forum: Fixing WordPress
In reply to: Site Suddenly Stopped Working!Nevermind, found this link about the White Screen of Death. A plugin must be the issue.
Forum: Fixing WordPress
In reply to: Javascript Not Working in Child ThemeInexplicably, it is working now. Thanks again for all your help, Andrew. You’re awesome.
Forum: Fixing WordPress
In reply to: Javascript Not Working in Child ThemeWell, thanks for trying to help, Andrew. If anyone else has ideas, please feel free to post them, because I am lost.
Forum: Fixing WordPress
In reply to: Javascript Not Working in Child ThemeSigh. I still don’t see it.
Forum: Fixing WordPress
In reply to: Javascript Not Working in Child ThemeThe site is no longer broken, but the function still doesn’t work.
Forum: Fixing WordPress
In reply to: Javascript Not Working in Child ThemeThis is what I have in functions.php:
<?php function toggleAbout() { var_dump(get_stylesheet_directory_uri() . '/js/toggle-about.js');exit; wp_enqueue_script( 'toggle-about', get_stylesheet_directory_uri() . '/js/toggle-about.js', '', true ); } add_action( 'wp_enqueue_scripts', 'toggleAbout' ); ?>And the site is broken. It just says: “string(71) “http://cubackpack.org/dev/wp-content/themes/knapsack/js/toggle-about.js”.”
Forum: Fixing WordPress
In reply to: Javascript Not Working in Child ThemeIt breaks the site.
Forum: Fixing WordPress
In reply to: Javascript Not Working in Child ThemeThis is all the code I have in functions.php:
<?php function toggleAbout() { wp_enqueue_script( 'toggle-about', get_stylesheet_directory_uri() . '/js/toggle-about.js', '', true ); } add_action( 'wp_enqueue_scripts', 'toggleAbout' ); function favicon_link() { echo '<link rel="shortcut icon" type="image/x-icon" href="/../../img/ico/favicon.ico" />' . "\n"; } add_action( 'wp_head', 'favicon_link' ); ?>And none of it is working. I put the favicon bit in there thinking that if it worked, maybe the problem was with my enqueue. But neither of the functions are working.
Forum: Fixing WordPress
In reply to: Javascript Not Working in Child ThemeOkay, now I’m majorly confused. I didn’t change anything else, but the site no longer breaks when I upload functions.php. It works whether or not functions.php is empty or contains code.
That being said, the javascript still doesn’t work.
I am so confused on why this isn’t working.
Forum: Fixing WordPress
In reply to: Javascript Not Working in Child ThemeYes.
This is why I found enqueuing confusing the first time I tried it…
Forum: Fixing WordPress
In reply to: Javascript Not Working in Child ThemeNo, I didn’t. I created a new functions.php. I don’t know what’s going on. I removed functions.php and the site is working again.
This is the only code that I had in functions.php:
<?php function toggleAbout() { wp_enqueue_script( 'toggle-about', get_stylesheet_directory_uri() . '/js/toggle-about.js', '', '1.0', true ); } add_action( 'wp_enqueue_scripts', 'toggleAbout' ); ?>What am I doing wrong?
Forum: Fixing WordPress
In reply to: Javascript Not Working in Child ThemeI followed your instructions for Stage 2 and enqueued the script, but it’s still not working.
I put this in functions.php:
<?php function toggleAbout() { wp_enqueue_script( 'toggle-about', get_stylesheet_directory_uri() . '/../../js/toggle-about.js', '', '1.0', true ); } add_action( 'wp_enqueue_scripts', 'toggleAbout' ); ?>And I put this in toggle-about.js:
jQuery(document).ready(function($){ $("toggle").click(function(){ $("#abouttoggle").slideToggle(); }); });Thanks for your patience and help with this.