Michael Fields
Forum Replies Created
-
Forum: Themes and Templates
In reply to: get posts based on 2 categoriesHave you tried the query_posts() function? If not, you just add it before your WordPress Loop and it allows you to specify what the loop returns. In your situation, the following would work. You just need to change the numbers to the id’s of the categories that you wish displayed:
<?php query_posts( 'cat=2,6' ); ?>Forum: Fixing WordPress
In reply to: Why does it search for “ie_hacks.css” in the post subdirectories?no problem 🙂
Forum: Plugins
In reply to: Plugin to paste unformatted textDaniel, Unfortunately, I do not think that there is, without some hackery at least 🙂
Forum: Themes and Templates
In reply to: Css style works randomThis page: http://studiocastelli.takingweb.com/banana/ has a ton of inline css styles in it while this page http://studiocastelli.takingweb.com/mela/ has absolutely none. Have you copied text from Word or like program?
Forum: Plugins
In reply to: Next/Previous X posts on single.phpThis plugin has always worked for me:
http://www.jenst.se/2008/03/29/wp-page-numbers/Forum: Plugins
In reply to: Plugin to paste unformatted textYou can do this through the visual editor by turning on the Kitchen Sink and use the “Paste from Word” button.
Forum: Fixing WordPress
In reply to: Excluding categories from categories menuinstead of:
wp_list_categories('sort_column=name&title_li=&depth=4');try:
wp_list_categories('sort_column=name&title_li=&depth=4&exclude=1,2,3');where “1,2,3” are the ids of the categories the you wish to exclude in ascending order.
Forum: Fixing WordPress
In reply to: Recent Posts on Home PagePlease read this page:
http://codex.ww.wp.xz.cn/Template_Tags/query_postsTo fix your problem, you will want to add this code before your loop”
<?php query_posts('cat=14'); ?>Forum: Fixing WordPress
In reply to: Image path defaulting to localhostUnfortunately, there is no setting to change to fix this. WordPress stores the full path to the image in the “postmeta” table in a record with the “meta_key” of _wp_attached_file. Depending on how many images you have, there are different solutions:
1. Only a few images: Open up phpmyadmin – if available – and edit the paths by hand.
2. Import and Export: Thankfully, WordPress has given us a powerful tools which allows us to import and export data – including attachments – between servers. I usually develop locally and would be lost without this feature. It lives in the WordPress Administration Panels under “Tools”.
3. Find and Replace: Give this script a try: http://spectacu.la/search-and-replace-for-wordpress-databases/ . I’ve never used it, but seems to do what you need it to.
Best wishes,
-MikeForum: Fixing WordPress
In reply to: Why does it search for “ie_hacks.css” in the post subdirectories?Hi John,
If you view the source of your site you will find the following code a few lines down:<!--[if IE]> <link rel="stylesheet" href="wp-content/themes/carpediem/ie_hacks.css" type="text/css" media="screen" />This is a conditional comment which will serve a style sheet meant only for Internet Explorer. Unfortunately, it appears that there was a small oversight on the behalf of the person who added this code to you theme. They have used a relative url:
wp-content/themes/carpediem/ie_hacks.cssDue to the fact that you are using custom permalinks, this stylesheet will only be served on your home page. To fix it, you will need to locate the line that it is defined on (most likely in header.php). and replace it with:
<!--[if IE]> <link rel="stylesheet" href="<?php bloginfo( 'url' ); ?>/wp-content/themes/carpediem/ie_hacks.css" type="text/css" media="screen" />Hope this helps,
-MikeForum: Plugins
In reply to: Looking for a plug. Req: Picture tagging and commentsImage Comments
No plugin is needed for this functionality as it is built into the core. You may, however, need to activate it for your theme.Check to see if your theme has an image.php file. If so open it in a text editor and search for the following code:
<?php comments_template(); ?>. If you cannot find it, add it inside your loop.If no image.php file can be found, try the same process with attachment.php.
Image Tags
This is a little trickier. I have found this plugin:
http://ww.wp.xz.cn/extend/plugins/media-tags/But it currently does not work on 2.8.6 only 2.8.4. Everything seems to work with it except the custom taxonomy archive pages. Something must have changed in WordPress core between these version that is causing it to fail.
Forum: Fixing WordPress
In reply to: ‘Header’ formatting of text content…(?)Not that I know of, but there is a possibility with css. All you would have to do is define some classes in your stylesheet:
.red{ color:#f00; } .green{ color:#0f0; } .blue{ color:#00f; }and then add them to your headers in the html mode:
<h2 class="red">Cool Beans</h2> <h3 class="green">Rad Beans</h3> <h4 class="blue">Zombie Killer Beans from Mars</h4>I know that this may not be the best-case-scenario that you were looking for, but if you implement it, it will do what you want it too.
Forum: Fixing WordPress
In reply to: How do I change Password Protected text?toyNN, I took a look into this and the
<br />is being inserted by the wpautop() function. This function treats the<input>element as a “block”. Unfortunately, there is no easy way to filter this function.The following solution is not the best, but will work.
add_filter( 'the_content', 'no_block_for_input', 2000 ); function no_block_for_input( $c ) { return preg_replace( '/<br \/>\s<input/', '<input', $c ); }Please bear in mind that it will remove all
<br />elements from the beginning of inputs posted via the Edit Post Content box which may be undesirable…. best I could do though :)’May be someone else knows how to better address this?
Forum: Fixing WordPress
In reply to: How do I change Password Protected text?You can alter anything inside the
custom_password_form()function. I hope this will illustrate:custom_password_form(){ /* Do what ever you want here */ }Hope this helps 🙂
Forum: Fixing WordPress
In reply to: How do I change Password Protected text?@asbo6544 – Thanks for the kind words 🙂 Yes, when you upgrade WordPress, the code I posted above will work just fine, Best wishes.