Just Thomas Misund
Forum Replies Created
-
Forum: Plugins
In reply to: Blog Stats not workingWill this help you?
Forum: Developing with WordPress
In reply to: Image upload not showing upWhat about memory_limit in PHP?
Forum: Fixing WordPress
In reply to: htaccess problemHave you tried updating the permalink structure in Otions > Permalinks? (/wp-admin/options-permalink.php)
Forum: Fixing WordPress
In reply to: Force posts with certain cat to be firstAllright, I see. Let’s try this approach:
1. Query all
cat=[genericCategoryID]posts
2. Start The Loop with a test if the post is a premium post using get_the_category()
3. Display these posts and end The Loop
4. Now querycat=[genericCategoriID],-63and do another LoopAny luck?
Forum: Fixing WordPress
In reply to: Force posts with certain cat to be firstI’m not sure if I understand you correctly. Do you want to first display posts within one category and then display posts within every other category?
If you first query
cat=1and then display them, you can always querycat=-1later to display every post that is not in category 1.Does that help?
Forum: Fixing WordPress
In reply to: Force posts with certain cat to be firstJust realized that this setup may not include all your posts. Could perhaps be fixed by adding the parameter
showposts=[an extreme number]to thequery_posts(). Example:query_posts(cat=134&showposts=9999)Forum: Fixing WordPress
In reply to: Force posts with certain cat to be firstFirst, create a Page and note the page ID (look in Dashboard > Manage > Pages).
Then copy your theme’s “category.php” and save it as “page-[page ID].php.” Example: If the ID of your newly created page is 134, you should save your new file as “page-134.php”.
In your new template file, locate The Loop. Also make a note of the Category ID of both Ad and Premium categories (Look in Dashboard > Manage > Categories).
Just before The Loop, insert
<?php query_posts('cat=[the Ad ID]'); ?>Example: If the Ad category ID is 1, it should be<?php query_posts('cat=1'); ?>After The Loop, insert
<?php query_posts('cat=[the Premium ID]'); ?>and then paste a copy of The Loop.A visit to your Page should now display all your Ad posts followed by all your Premium posts.
Edit: typo
Forum: Fixing WordPress
In reply to: Show 4 latest post from different categoriesFirst of all, please excuse my English 🙂
If you copy your Loop and paste it in between your queries, it should be working just fine.
<?php query_posts('cat=3'); ?> [Paste the Loop here] <?php query_posts('cat=5'); ?> [Paste the Loop here as well] <?php query_posts('cat=8'); ?> [Copy The Loop from here]The Loop is what starts with:
<?php if ( have_posts() ) : ?>and ends with something like:
<?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?>Forum: Fixing WordPress
In reply to: Show 4 latest post from different categoriesTo only select posts from category 1, use
<?php query_posts('cat=1'); ?>just before your Loop in your theme’s index.php.Then, to select posts from category 2, use
<?php query_posts('cat=2'); ?>and insert another Loop (copy-paste) to display these posts.Same goes for your last two categories.
To select how many posts you want to display from each category, go to your Dashboard > Options > Reading, look under “Blog Pages” and set the value “Show at most […] posts”.
Forum: Fixing WordPress
In reply to: How do I make a homepage specific sidebarThis way perhaps you don’t need to create a specific home page template:
?>
<?php if (is_home()) {
include (TEMPLATEPATH . '/frontpagesidebar.php')
}
else{
get_sidebar();
}Forum: Fixing WordPress
In reply to: Home Page sundenly generate error !If I were you, I’d probably back up everything (everything) and try to see if a reinstall would do any good.
Forum: Fixing WordPress
In reply to: Tagging problem with Technorati tagsOf course. Go to wp-admin –> Options –> Reading
How stupid of me to overlook that. =)
Forum: Fixing WordPress
In reply to: Fatal error in line 1815.Have you tried reinstalling? Have you added any plugins lately?
(If you reinstall, take a backup first in case you break something.)
Forum: Plugins
In reply to: post title to an external url/blogDo you need a plugin for this? How about a custom field with the URL, and a little tweaking with the following:
<h2 id="post-<?php the_ID(); ?>"><a href="<?php // PUT CODE HERE TO GET CUSTOM META DATA ?>" rel="bookmark" title="Permanent lenke til <?php the_title();?>"><?php the_title(); ?></a></h2>The text in caps should be replaced, but I don’t know the_meta() well enough. Anyone?
Forum: Fixing WordPress
In reply to: Form for code postingBut of course, you mean in a post. Have you tried turning off the visual rich editor in admin –> options –> writing ?