Michael Fields
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Confused about file names: searchform, Search Form and search_form1) my search form’s file name is “searchform.php”, but in the Appearance > Editor > Template list it also has a name of “Search Form”.
“searchform.php” is the name of the php file as it is viewed by the file system on your server. “Search Form” is a title that the Template Editor gives to the aforementioned file. Basically, “Search Form” is a human readable version of the filename.
2) And when you want to include it into somewhere such as the sidebar, you call it “search_form”, as in <?php get_search_form(); ?>
get_search_form() is what is known a a Template Tag which is basically a php function that allows you display different parts of your blog in various different templates. This Template Tag looks for a file called searchform.php in your current theme’s directory and if it finds it, it will include this file in the template. If the file is not found , it will print a default version of a search form to the screen.
Where do these alternative names come from?
I think they are just there to confuse new users:)
I’ve created a new newsletter subscription form called “subscribeform.php”. I’d also like to give it a plain English name and include it in my sidebar.php. How do I do this?
Not sure about giving it a Plain English name, but it is rather easy to include into your sidebar. First, upload subscribeform.php to your server – into your current theme’s directory. Next, open your sidebar.php file in a text editor and add the following code in the spot where you would like the form to appear:
include( TEMPLATEPATH . '/subscribeform.php' );If your theme is widget enabled, you will want to put this bit of code outside of the “widget conditional”… it looks something like this:
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>Best of luck to ya!
Read this – the second post down.
Why are you using 2 installs for the same site? I seems to me that the best solution would be to use one. Just trying to figure out your motivations. There is probably a better solution than using two installs. Please reply with a link.
Forum: Plugins
In reply to: what’s the php function through i can write a post via phpwp_insert_post() is probably what you want. You can view the source here.
Forum: Fixing WordPress
In reply to: adding next, previous to pages with postsOh, I’m sorry… after re-reading your first message I see that I misunderstood your question. If you are looking to display previous next navigation for single posts, then you can use these two functions: http://codex.ww.wp.xz.cn/Template_Tags/next_post_link and previous_post_link(). Note, these functions have almost the same name as the ones that you posted.
Forum: Themes and Templates
In reply to: Adding a non-page link to navigation barIf you are using 2.7, the code that you posted will not work, due to the fact that the function wp_page_menu() does exist. The following code should get you to where you want to be:
<div id="sub_menu"> <ul> <li><a href="<?php echo get_settings('home'); ?>">Home</a></li> <li><a href="skalinaresume.doc">Resume</a></li> <?php wp_list_pages('depth=1&title_li='); ?> </ul> </div>also, you should use an absolute path to your resume, especially if you are using permalinks.
Forum: Fixing WordPress
In reply to: Where is the blog?Your blog should be here: http://mysite.com/blog/. It is possible that your server’s install package did not set a few important variables in your database. navigate to you setting/options page in wp-admin and see if the following two fields are set to “http://mysite.com/blog/”
Blog address (URL)
WordPress address (URL)Forum: Themes and Templates
In reply to: What’s the name of the theme ?Maybe one of these links can help you find it:
http://ww.wp.xz.cn/extend/themes/search.php?q=yellow+orange
http://ww.wp.xz.cn/extend/themes/search.php?q=orange
http://ww.wp.xz.cn/extend/themes/search.php?q=yellowForum: Fixing WordPress
In reply to: adding next, previous to pages with postsTo my knowledge, this functionality does not exist in WordPress. Both the next_posts_link() and previous_posts_link() functions are programmed to work on “page views” that naturally display posts: category & archives pages as well as the default homepage view. Adding these functions to page.php (or any page template for that matter) will render no results. WordPress has no way of knowing which posts to show as “previous” or “next” unless there is data given in the query string.
IMO, you would have to create your own custom paging system that would pass variables in the url which would allow a visitor to stay on one “page” (as WordPress sees things), but cycle through chunks of posts – say maybe 5 at a time.
Best of luck… and if you figure out the code, please post it. You are not the first person who has asked a question like this and you certainly won’t be the last 🙂
Forum: Fixing WordPress
In reply to: Getting Flash File to work in WordPress.not sure… If you want, feel free to email the files to the flash apparatus and I’ll try to get them to work. My email can be found on the contact page of my site – just click my name on the left.
Forum: Plugins
In reply to: How to transform blog to portal?That site usess Brian Gardners’ Revolution2 Theme. It looks like his site is down at the moment, but keep trying 🙂
Forum: Fixing WordPress
In reply to: Getting Flash File to work in WordPress.Ok.
Something new to try.
move the xml file back to where it was. and the ne fix the paths in this bit of code:<div><script type="text/javascript"><!-- AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','900','height','180','src','file:/wp-content/themes/overeasy/FlashFiles/carousel','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','/wp-content/themes/overeasy/FlashFiles/deploy/carousel' ); //end AC code // -->These two lines:
/wp-content/themes/overeasy/FlashFiles/carousel
/wp-content/themes/overeasy/FlashFiles/deploy/carouselshould be pointing to swf files, but they are not.
Forum: Plugins
In reply to: How to clean meta datas generated by plugins?If you are using a plugin that is creating a w3c error, than it is best to fix the error in the plugin that is causing the error. most of the time it is an easy fix. Then you could alert the plugin author that there is an error in their code and ask them to fix it in a upcoming release. If the plugin is licensed under GPL you can also re-release including your valid html/css fix. This was actually done with the realse of WordPress 2.5 where the gallery shortcode was causing invalid code to print. Someone created a plugin that fixed the errors + added a bit of cool functionality.
If you really don’t want any plugin to touch the head of your document, you could just not add the
wp_head()action from your header.php file, but, this will cause more trouble for you down the road when newly installed plugins fail to function properly. If you are releasing your theme for others to download and use, I would strongly suggest including the wp_head() action in your header.php file.Forum: Fixing WordPress
In reply to: Getting Flash File to work in WordPress.Try this:
move carousel.xml to: http://www.adcuda.com/carousel.xml
You will need to use the following code before the WordPress code in you .htaccess file if you are using any kind of permalink configuration
RewriteCond %{REQUEST_FILENAME} !-f RewriteRule carousel.xml$ /carousel.xml [L]Forum: Fixing WordPress
In reply to: Add home page link to pages menu-default themeyou can use: wp_page_menu() instead of wp_list_pages().