miloandrew
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: limit number of post on front page onlytry:
<?php $page_num = $paged; if ($pagenum='') $pagenum =1; query_posts('cat=1&showposts=7&paged='.$page_num); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> // WordPress loop endwhile;endif; ?>
Where the query_posts cat=1 is set to the category ID that you want to pull from.
Forum: Fixing WordPress
In reply to: Disable Commens and date time in wordpressDo you mean for ALL comments, or for just a few posts.
You can turn comments off for a page simply by going to the bottom of the page and under Comments and Pings, disabling both options.
Its an easy way to do it without hacking your template.
If you want to completely remove them for pages, you need to remove it from the page.php file in your template. Assuming of course, you are really talking about WordPress Pages, and not just a post. ??
Good luck!
-A
Forum: Fixing WordPress
In reply to: Bug or “Feature”? “Posts” page won’t use custom page template…Well, that was a quick bug.
It is now closed as NOT a bug.
When you select a static front page, the following items are true:
is_front_page()
is true on your designated static pageis_home()
is now true for your designated “Posts” page- home.php is the active template for your “Posts” page.
- Your “posts” page will no longer return a TRUE with the function
is_page();
So, so sum up this entire post:
When a static page is selected as the front page, and a secondary page is designated as your “posts” page, a custom page template as designated on the page editor will not work for the post page. Instead, use home.php to change the layout of your post listing.
Forum: Fixing WordPress
In reply to: if < todays_date = date from custom field > do stuffMy pleasure! ??
Cheers,
AForum: Fixing WordPress
In reply to: what did I just do? ( 403 Forbidden)?? Anytime! Glad it helped!
Best of luck,
AndyForum: Fixing WordPress
In reply to: what did I just do? ( 403 Forbidden)Enabling greenbusinesscapital.com to work is a DNS / Hosting issue, not a WordPress issue. Talk to your hosting provider about making the non-www version work.
In the mean time, if you want to get it back up and running, you need to change your URL back to the www version. You can do that following these directions for MySQL:
https://www.tamba2.org.uk/wordpress/site-url/
Be careful though, as it involves messing with your DB directly.
Good luck!
-A
Forum: Fixing WordPress
In reply to: Image Display on WP.com site vs. personal WP installWell, you can do the following:
Make a post version of the picture for the post using your own image sizing tool, and then set the image URL to be a link to a full version that is also hosted on your site.
Otherwise, you will need to use some kind of plugin that will dynamically resize images to the specified dimensions. I don’t use wordpress.com, so I can’t say how they are handling it.
Maybe someone else can!?
Good luck,
AForum: Fixing WordPress
In reply to: if < todays_date = date from custom field > do stuffIf your event field already has things in the format 2008-08-09, don’t change things back to time. Just compare strings.
Try this:
<?php query_posts('category_name=events'); $todays_date = date("Y-m-d"); if (have_posts()) : while (have_posts()) : the_post(); $event = get_post_meta($post->ID, 'event', $single = true); if($event == $todays_date) { the_title(); } endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?>
That may work.
Forum: Fixing WordPress
In reply to: Block e-mail from spammersUse Akismet! https://akismet.com/
It rocks.
Forum: Fixing WordPress
In reply to: How to add automatic text on posts??AFAIK, This will be fairly difficult to do given the lack of a repeatable pattern. I suppose you can use the https:// and use the next blank space ” ” as the end of the pattern.
In any case, doing what you want to do will likely require you to make a new plugin for WordPress and leverage the php preg_replace function:
https://us3.php.net/preg_replace
It requires the use of a pattern to recognize the string that you want to replace. You may find it easier to do this with a shortcode tag though:
https://codex.www.ads-software.com/Shortcode_API
as is used by the Gallery and other plugins. It at least removes the ambiguity of the end of the URL that you want to replace.
Best of luck,
-AForum: Fixing WordPress
In reply to: Bug or “Feature”? “Posts” page won’t use custom page template…Submitted bug #7715.
Forum: Fixing WordPress
In reply to: Bug or “Feature”? “Posts” page won’t use custom page template…Bump… Anyone?
Forum: Fixing WordPress
In reply to: Neither images, links nor Flash showing up on homepageWow, Andreas – that’s some awesome service… ??
Forum: Fixing WordPress
In reply to: Page very slowSure thing! Did they have a different response? ??
Forum: Fixing WordPress
In reply to: Permalinks in 2.6.1 still not workingJust for those who are considering updating – my upgrade went just fine.
I use a custom permalink structure:
/%year%/%monthnum%/%postname%.html
because I originally migrated over from Blogger to a WP 1.X release.
To offer a different perspective than a lot of folks on this thread, I have never had a problem with upgrading WP versions and loosing my permalinks. I use VPS servers from Dreamhost, who provide excellent one-click installs and upgrades for WordPress. Their shared servers are slow, but they get all of the WordPress settings right, and it has worked flawlessly for many, many versions. Their VPS servers are as fast as you want to pay for.
I hope you realize that I don’t say this to denigrate anyone having a problem, or even to trivialize the problem that they are having. Rather, I hope to provide some counter-balance to the notion that permalinks don’t work in 2.6.1. The DO work in 2.6.1, if everything is properly configured.
So, the good news is that fixing this issue is likely in your own hands, and you don’t have to wait for the WP folks to release a new version. That’s the bad news though as well – fixing it is likely in fixing your own settings. ??
Best of luck,
APS – if its helpful to anyone, this is the .htaccess file I use:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress