Sean
Forum Replies Created
-
My coder / web developer friend pointed out the stray
});
after the colorbox function, and used this notation to resolve the conflict with$
s:<script type="text/javascript"> (function($) { $(document).ready(function() { $("a[rel='colorbox']").colorbox(); $("#menu > li").click(function() { $("ul", this).slideToggle(400); }); }); })(jQuery); </script>
I’ve still had to manually queue jquery like so, which I thought WP did automatically?:
wp_enqueue_script('jquery');
Hi esmi and thijs77, thank you both for your help. I’ve been adding scripts to themes the wrong way for a while then!
My header.php’s <head> now looks like this:
... <?php if (!is_admin()) { wp_enqueue_script('jquery'); /* Colorbox */ wp_register_style('colorbox_css', get_bloginfo('template_directory') . '/js/colorbox/colorbox.css'); wp_enqueue_style('colorbox_css'); wp_register_script('colorbox', get_bloginfo('template_directory') . '/js/colorbox/jquery.colorbox-min.js'); wp_enqueue_script('colorbox'); }; wp_head(); ?> <script> jQuery(document).ready(function(){ jQuery("a[rel='colorbox']").colorbox(); }); jQuery("#menu > li").click(function() { jQuery("ul", this).slideToggle(400); }, function (){}); }); </script> </head>
I’ve checked the file paths again and they’re fine. Unfortunately this didn’t fix Colorbox, and the jQuery menu above no longer works. It was working while I included jquery manually in sidebar.php where #menu lives (an earlier mistake/temporary measure), but now doesn’t work with or without that manual include. Without it, I noticed that WP also wasn’t automatically including jQuery in <head>, which is why I added
wp_enqueue_script('jquery');
but again to no avail.So to clarify, I’ve removed manual js includes in and out of <head> and have declared and enqueued custom scripts/styles the safe way as above. I’ve tried using the jQuery notation (rather than $), and moving the contents of <script> into <body>, but the problem persists.
Thanks for putting me on the right path.
Forum: Themes and Templates
In reply to: Wrapping comments in quotation marks(Hmm… I did put those unicode quotation marks between backticks.)
Forum: Fixing WordPress
In reply to: Multiple Loops with in_category tagSorry for kicking up a fuss. I overlooked an important part of this wiki entry.
Forum: Fixing WordPress
In reply to: HACKED!Okay, that might be a little difficult, since the distinct value you see in phpMyAdmin is a scrambled version of the password.
I’m a newbie at this, so I don’t know if this will work, but changing the value to ‘21232f297a57a5a743894a0e4a801fc3’ should set the password to ‘admin’–I think–. Log in immediately and change the password.
Forum: Fixing WordPress
In reply to: HACKED!Okay, well log into your cpanel, and you should see a bank of buttons. ‘MySQL’ should be in there; usually in the third row, third column. Click on it, and then scroll to the very bottom of the page. There should be a small text link for phpMyAdmin.
Once in phpMyAdmin, choose your wordpress database from the dropdown menu on the left hand side. Then select the ‘wp_users’ table from the list that will appear below the drop down menu. You can edit the user_pass field from there.
This wiki will probably help.
Forum: Fixing WordPress
In reply to: HACKED!Marque, does your host offer cpanel? If so, phpMyAdmin is accessible though a small text link at the bottom of your MySQL page.
And yeah, do upgrade ASAP.
Forum: Fixing WordPress
In reply to: htaccess and Pages problem?644 sounds right to me. It doesn’t sound like a .htaccess problem either.
Do you have any formatting that is specific to pages in page.php? (i.e. Is it different to index.php?)
One thing you could try is to temporarily rename pages.php (since you said you traced the problematic statement there) and see if the page loads okay using index.php (WP will default to index if it can’t find page). If it works, then just find the discrepancy in pages.php and replace it with the code in index.php
Hope that helps.
Forum: Fixing WordPress
In reply to: Category Hierarchy Not DisplayingNope, I tried removing all the plugins as well.
Forum: Fixing WordPress
In reply to: Category Hierarchy Not DisplayingYes I do.
Forum: Fixing WordPress
In reply to: Category Hierarchy Not DisplayingThanks moshu.
In my case the child categories actually disappear (sorry I wasn’t clear). I’ve tried switching to themes which have working hierarchies in them, but the categories still don’t show.
I’m at a loss as to where to start looking, since I’ve already reinstalled WP to try to fix it.
Forum: Fixing WordPress
In reply to: Footnotes with a twistThanks miklb – will do:)
Forum: Fixing WordPress
In reply to: Footnotes with a twistThanks. I can’t provide a link right now, but I think I’m on the right track. I’ve found some examples I like and am trying to make sense of the code:)
Thanks again for all your help.
Forum: Fixing WordPress
In reply to: Footnotes with a twistThe footnotes did have some html in them. I used preg_replace to remove them, and this worked when I tested it on a page, but I wasn’t sure where to put the code to apply it to RSS feeds… Still, the page could still be messy in IE. Do you know how I might get the footnotes to display as inline elements but still outside of the paragraph flow? That is, how would I get the footnotes to show beside a word which is mid-paragraph without breaking the sentence up with line breaks? I tried
display: inline;
but it didn’t seem to do the trick.I’m beginning to warm to Daring Fireball’s more conventional method, but I’ll hold out for a while.
Forum: Fixing WordPress
In reply to: Footnotes with a twistYes the footnotes do show up as plain text in RSS feeds, but I’d rather cut them out completely, so they don’t show.
I’ll definitely look around for css tricks – thanks for the hint.