Michael Fields
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to call “favourite” or “best” posts in sidebar?1. You can create a category called “Favorites”. ANd then download, install and configure the Category Posts Widget. This is probably the best solution.
2. Create a text widget and hand code – This is how I do it:)
Forum: Themes and Templates
In reply to: How to have separate page for posts (not index.php)What I have done in the past:
1. Create a custom Page Template that will display all of the code on your site home page – in your situation, you can most likely copy all the code from you modified index.php. – Upload this file to your theme’s folder
2. Create a new WordPress page called “Home”. Select your custom page template from the “Template” drop down under “Attributes” on the right hand side bar of the “Add/Edit Page” screen. Publish your new page.
3. Create a new WordPress page called “Blog” and publish it. This page’s content box can be left blank.
4. Navigate to Settings -> Reading in your WordPress admin. The first set of options are “Front page displays”.
5. You want to select “A static page (select below)” for the radio button input.
6. Select “Home” for “Front page” and “Blog” for “Posts Page”.
7. Scroll down to the bottom and press “Save Changes”.
Forum: Themes and Templates
In reply to: How can i display user ID on homepageThis worked for me:
<?php global $userdata; get_currentuserinfo(); print intval( $userdata->ID ); ?>Forum: Themes and Templates
In reply to: drop down navigation no longer working with inove themeYour problem is most likely being caused by the 300+ html errors mixed with 21 css errors. Please validate your code.
Forum: Themes and Templates
In reply to: Separate template for Archives too…As far as my understanding if template hierarchy goes, category-18.php should override the need for a file such as archive-18.php. Check out the chart. See category-x.php will be called instead of archive.php for all “category archive” views where the category queried is equal to x.
Perhaps I am not understanding your question, would you like to change the display of certain posts on say a month or year archive view? If so, you want to look into using Conditional Tags in the loop inyou archive.php file.
Hope this is helpful.
Forum: Themes and Templates
In reply to: How to include the header/sidebar footer in this php filecart.php – needs to include wordpress function files to execute wordpress code. Please see this thread: http://ww.wp.xz.cn/support/topic/179469?replies=6
Forum: Themes and Templates
In reply to: List subpages of a page with an arrayThis is how I do it:
$pageChildren = $wpdb->get_results(" SELECT * FROM $wpdb->posts WHERE post_parent = ".$post->ID." AND post_type = 'page' ORDER BY menu_order ", 'OBJECT'); if ( $pageChildren ) : foreach ( $pageChildren as $pageChild ) : setup_postdata( $pageChild ); /* Template Tags go here!!!! */ endforeach; endif; ?>Hope this helps
Forum: Themes and Templates
In reply to: Still unable to upload new template!!flying fish,
It looks like you have uploaded all of you new theme’s files into your “themes” folder (http://globaldrugdebate.com/wordpress/wp-content/themes/), instead of uploading a folder containing the theme files. Try this:1. Log into your server via ftp.
2. navigate to: /wordpress/wp-content/themes/. You should see the following…/default/
/classic/
/img/
index.php
page.php
style.css
category.php
archive.php etc…You want it to look more like this:
/default/ – wordpress default theme
/classic/ – wordpress classic theme
/your-custom-theme/ – the theme you uploaded.Hope this helps
Forum: Themes and Templates
In reply to: What other files do I need to change when changing style.cssNope, That should do it. Try a hard refresh ( control + F5 on windows ) that will force your browser to download everything again and you should see your updated image.
Forum: Fixing WordPress
In reply to: Main navigation links break from comment pagespaperduck.
A quick fix would be to change your href attributes to point the the web root:
../contact.phpChange to
/contact.phpForum: Themes and Templates
In reply to: Article image which can be resizeddaveredfern,
Check out the 6th post down in this thread:
http://ww.wp.xz.cn/support/topic/209656?replies=9I think this is what you are looking for.
Forum: Themes and Templates
In reply to: No Templates in Edit Page Template is missing???Found the solution to my problem and I am posting it here just in case anyone else finds themselves in a similar predicament…
I had 2 comments in my stylesheet.css file:
/* Main Template --------------------------------------------------- */and
/* Auxiliary Template: 404, Success + Error Pages --------------------------------------------------- */Although there is no error here (as far as css is concerned), WordPress does not like the fact that I used the string “Template” inside of comments. When I removed “Template” from both comments, the theme was no longer “broken”.
Hope this helps someone.
Forum: Themes and Templates
In reply to: Extra padding in IE6&7whisperofreality,
The problem that you mentioned:I now notice that selecting a new page causes the navigation links to move slightly to the right or left (depending on which link is selected)
This is not actually a bug rather it can be explained by regular browser functionality. You see, the Home and News pages are very short (vertically)… so short the the browser see now need to render a vertical scrollbar. The other 3 pages on the site are long – therefore, the browser does render a scrollbar. This will be true in just about every browser on the market.
Below are a few options that you might want to explore. I don’t think that any of them are cross-browser supported, but at least they will help in some browsers. A javascript solution might be helpful to – I am not aware of one though.
If you find an alternative solution, please post as I would love to know it!!!
Best of luck,
-Mike#1
html { overflow-y: scroll; }#2
html { overflow-y: scroll; }
html { overflow: -moz-scrollbars-vertical; }Forum: Themes and Templates
In reply to: New page becomes big link to authors siteHonestly, I do not see what you have described. Is it possible that it only happens when you are logged into admin?
Forum: Plugins
In reply to: Enable WYSIWYG editor in pluginHi. The process posted above works great for me in 2.6.2. Here;s the exact code I used:
add_action( 'init', 'my_plugin_init' ); function my_plugin_init() { wp_enqueue_script( 'word-count' ); wp_enqueue_script('post'); if ( user_can_richedit() ) wp_enqueue_script('editor'); add_thickbox(); wp_enqueue_script('media-upload'); }