Matt Cohen
Forum Replies Created
-
Forum: Hacks
In reply to: Help with JQueryHi chinchanchan,
JavaScript in WordPress, the first time, can seem confusing.
I’ve written a blog post explaining using JavaScript in WordPress which will hopefully shed some light on the subject.
Essentially, it’s a matter of “enqueuing” the JavaScripts you’re looking to run, as well as the call.
This is the call:
‘$(function() {
$(“pre”).transpose();
});’You would place the call in it’s own JavaScript file and enqueue it like the others, but as the last file to make sure all the other scripts are loaded.
I hope this helps. 🙂
Cheers,
Matty.Forum: Plugins
In reply to: [WP Section Index] [Plugin: WP Section Index] Ignoring Headers with TagsHi Alan,
Thanks very much for your suggestion and the link to Anchor Links.
I’ll take a look into your request and add it to the feature wishlist, if it’s viable. 🙂
Cheers,
Matty.Forum: Plugins
In reply to: [WP Section Index] [Plugin: WP Section Index] Ignoring Headers with TagsHi iftomkins,
I have updated WP Section Index to version 0.0.0.8 which now includes more robust support for heading tags with attributes and nested XHTML tags.
I hope this helps.
Please advise if you experience any issues with this update. 🙂
Cheers,
Matty.Forum: Plugins
In reply to: [WP Section Index] [Plugin: WP Section Index] Ignoring Headers with TagsHi iftomkins,
Thanks for your post.
At the first opportunity I get, I’ll be looking into optimising WP Section Index further to accomodate different heading tag compositions (for example, XHTML tags within heading tags, such as in your situation).
Does Table of Contents Creator not do the same thing as WP Section Index?
Cheers,
Matty.Forum: Plugins
In reply to: [WP Section Index] [Plugin: WP Section Index] great pluginHi philme,
Thanks for your kind words about WP Section Index. 🙂
The plugin is ready to be localised. I’ll get onto the final pieces of this as soon as possible and update with a fully localised version. 🙂
The frontend widget and processing should, however, work correctly with the blog set as any language (it doesn’t depend on anything related to the language in order to function).
The “back to top” text will be localised.
Thanks again for your kind words. 🙂
Sincerely,
Matty.Forum: Fixing WordPress
In reply to: admin custom column & quick menuHi Tosak,
If you create a column with the key oftitle, the quick menu will automatically be displayed underneath the post title in this column.I hope this helps. 🙂
All the best,
Matty.Forum: Plugins
In reply to: [Fotobook] [plugin fotobook] Can’t get albums@aaron_guitar Thanks for this fix, Aaron. It’s working perfectly on my end. 🙂
@runningboy01 Has the fix provided by Aaron worked on your end?
Forum: Themes and Templates
In reply to: undefined function bloginfo@rvoodoo is correct regarding your tag layout. If this code layout is imperative to your theme, I’d recommend
<p><?php bloginfo( 'template_url' ); ?></p>as it’s easier to read and follow. 🙂Regarding your query, is the
script.phpfile being included/required viaindex.php? If not, thescript.phpfile doesn’t have access to all available WordPress functions, includingbloginfo().On another note, it isn’t recommended to mix PHP and JavaScript, as you have done in your example. There are other methods of achieving this result that keep the separation between the PHP (working layer) and the JavaScript (“animation”/DOM manipulation on client side layer).
If you require the
script.phpfile inindex.php, you could also write:<?php require( 'script.php' ); ?>I hope this helps. 🙂
All the best,
Matty.Forum: Themes and Templates
In reply to: Fatal error: undefined function blog info.@rvoodoo PHP isn’t too picky about the semi-colon. It’s generally good to use them though. 🙂
@samuel F. Another option may be to replace the call to
bloginfo()withecho get_bloginfo(). Thebloginfo()function usesget_bloginfo()to retrieve the data you’re querying for.If the
bloginfo()function isn’t present, it seems to me as if there is a file that isn’t loading correctly in your WordPress installation. Ifgeneral-template.phpisn’t the problem file, it would be the file that loads it in.Is it possible to update your installation with a freshly downloaded version of the latest version of WordPress? It is quite possible that a file didn’t finish uploading properly or was missed when uploading via FTP.
I hope this helps, Sam. 🙂
All the best,
Matty.Forum: Themes and Templates
In reply to: Fatal error: undefined function blog info.Hi Samuel F.,
Based on theCall to undefined function bloginfo()error you have received, it seems as though the file containing this function is either not present, incomplete (ie: it didn’t finish uploading correctly) or is corrupt.The file containing this function is:
wp-includes/general-template.php.I would recommend re-uploading a fresh copy of this file (from a freshly unzipped copy of the version of WordPress you are coding on) and see if this resolves the issue.
I hope this helps. 🙂
All the best,
Matty.Forum: Themes and Templates
In reply to: error in themeHi dublintours,
On viewing the link provided, I noticed a PHP error that reads as follows:
Fatal error: Call to undefined function: wp_specialchars_decode() in /usr/local/pem/vhosts/187777/webspace/httpdocs/wp/wp-includes/formatting.php on line 268In this case, I would recommend re-uploading the wp-includes folder from a fresh version of WordPress (that has the same version number of the one used on your installation) and see if this remedies the issue.
The function in question is defined in wp-includes/formatting.php around line 355. If you’d prefer not to re-upload the entire folder (recommended as there may be other files missing), I’d recommend re-uploading a fresh copy of formatting.php into wp-includes.
All the best,
Matty.Forum: Plugins
In reply to: Contact form 7 not shown with Get PageHi aminabbasian,
Using your original code snippet, this may be a solution:
<?php $page_id = 7; $page_data = get_page( $page_id ); $content = apply_filters( 'the_content', $page_data->post_content ); $title = $page_data->post_title; echo $content; ?>Essentially, to render shortcodes, etc, the filters on
the_contentneed to be applied.More on this is available at: http://codex.wordpress.org/Function_Reference/apply_filters
I hope this helps. 🙂
All the best,
Matty.Forum: Themes and Templates
In reply to: changing css in hybridHi bluellipse,
When customising an existing WordPress theme, it is advised to create a child theme.A child theme is, essentially, a theme that makes use of the files of another theme and the styling (and any overridden functionality) of your new theme.
Creating a Hybrid child theme is easy. The steps are as follows:
1. Unzip Hybrid into your themes folder.
2. Create a new theme folder.
3. Inside your new folder, create a style.css file and paste the following code at the top, changing the areas in capitals:/** * Theme Name: YOUR_THEME_NAME * Theme URI: * Description: A_DESCRIPTION_OF_YOUR_THEME * Version: 0.7.1 (keep this the same as Hybrid, for your reference) * Author: YOUR_NAME_HERE * Author URI: http://your-url.com * Tags: YOUR_TAGS_HERE * Template: hybrid */This essentially tells the system: “This is my new theme, and if you can’t find a file in here, look in
hybridfor the file.” This is the concept of child theming. Thus, the original Hybrid theme is preserved, and your changes are separated into your own theme.If you wish to override specific functionality within Hybrid, there are a selection of filters and hooks that can be modified, along with the extensible nature of the Hybrid theme.
I hope this helps. 🙂
There’s also an excellent community over at the Theme Hybrid website: http://themehybrid.com/support/ 🙂
All the best,
Matty.Forum: Themes and Templates
In reply to: error in themeHi dublintours,
This error usually surfaces when a file has not finished uploading via FTP or is in some way incomplete.A possible solution could be to re-upload the functions.php file from a fresh copy of the wp-includes folder (ie: download WordPress, unzip and upload wp-includes/functions.php from there) and reload the page.
Please advise if this resolves the issue you are experiencing.
All the best,
Matty.Forum: Plugins
In reply to: Javascript in WordPress PluginHey frent, deanhoover, kingkool68,
Enqueuing Javascript in WordPress seems to be a regular topic of conversation. I have had similar issues in the past, including Javascript conflicts caused by incorrectly included Javascript.
Please see my blog post on Javascript and WordPress – The Definitive Guide for a detailed explanation of how to enqueue Javascript within WordPress plugins and themes.
I hope this helps. 🙂
Cheers,
Matty.