Pravin Paratey
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How do I get $_POST values from a form in wordpressI’m trying to do the same. Can anybody suggest an alternative?
Forum: Fixing WordPress
In reply to: How do I get $_POST values from a form in wordpressI’m trying to do the same. Can anybody suggest an alternative?
Forum: Plugins
In reply to: Popular Posts PluginEr. There is something much easier –
SELECT ID FROM wp_posts ORDER BY comment_count DESC LIMIT 10;
D’oh. If you want to show the 5 most popular posts in your template, you can use something like this –
<?php $sql='SELECT post_title, comment_count, guid FROM wp_posts ORDER BY comment_count DESC LIMIT 5;'; $results = $wpdb->get_results($sql); foreach ($results as $r) { echo '<li><a href="' . $r->guid . '" title="' . $r->post_title . '">· ' . $r->post_title . ' <em>(' . $r->comment_count . ')</em></a></li>'; } ?>
Forum: Plugins
In reply to: Popular Posts PluginSELECT comment_post_ID , COUNT(comment_post_ID) FROM wp_comments GROUP BY comment_post_ID ORDER BY COUNT( comment_post_ID ) DESC LIMIT 10 ;
This SQL statement does the trick. It returns the 10 most commented upon post IDs.
Now if someone can make a plugin out of this …
Forum: Plugins
In reply to: Popular Posts PluginBumping this up ??
Forum: Fixing WordPress
In reply to: Characters being changed to question marks!Looks like an encoding issue. Under firefox, click View -> Text Encoding and select UTF-8. IE should have something similar too.
I’m thinking this is a server header issue (the server is telling your browser that the page is not utf-8). Either this, or you imported your older blog as non utf-8.
Forum: Everything else WordPress
In reply to: 2.3 coming out today?me too!
Forum: Fixing WordPress
In reply to: Migrating from Non-CMS database site to WP databasehttps://codex.www.ads-software.com/Database_Description
This document explains the wordpress db structure.
You can use phpMyAdmin to export your existing database into a text file with SQL statements.
Next, write a parser (regular expression matcher) to go through each sql statement and transform it to the wordpress format.
Later, import this sql file from phpMyAdmin.
(Alternately, you could transform the sql statements into xml and import from your wordpress admin interface)
Forum: Fixing WordPress
In reply to: Directory Listing is deniedIt would help if you tell us what you’re trying to do.
I’m assuming you’ve just installed wordpress. In which case, have you enabled php on your server?
Forum: Requests and Feedback
In reply to: Please Re-evaluate hosting listI use Dreamhost and MediaTemple for my hosting needs. I’ve found both to be pretty good.
For One Click installs and a good community support, pick Dreamhost. These guys implement the latest versions of everything as soon as they come out.
MediaTemple has great support. But they don’t implement the latest stuff. They like to wait out and see how it pans out. Which makes them more stabler than Dreamhost I suppose.
Not that Dreamhost has given up on me yet. Plus it’s cheaper and lets you do a lot of things.
Forum: Fixing WordPress
In reply to: Migrating from Non-CMS database site to WP databaseTake a look at the mysql tables that wordpress uses for storing its posts, comments, users, etc.
Then take a look at your existing database. All you’ll have to do is write a script to retrieve values from your db and output them to a file as sql statements for the target (wordpress) db.
It should be pretty straightforward. If you can describe your current database schema, it would help.
Forum: Themes and Templates
In reply to: header.php has no place for keywordsLooking at your source, I do see the keywords meta tag. Which keywords are you referring to?
Forum: Themes and Templates
In reply to: RSS Text ColorAdd the following lines at the end of /wp-content/themes/presscut-theme-10/style.css
a.rsswidget {
color:black;
}Forum: Plugins
In reply to: WordPress Image Post GalleryAlternatively, you can just create a file called category-x.php (where x is the number of your art category) and add the code above to it. This way you don’t have to make that page.
You will have to modify the code for pagination though. This is because the
query_posts('cat=x')
will show you the first page no matter what/page/
you are on. One way is to not show pagination and just get all posts.Forum: Plugins
In reply to: WordPress Image Post GalleryThis can be achieved by creating a separate page template and then linking this template to your page.
Creating Template
—————–Something on the lines of –
<?php get_header() ?> <!-- This is what we add. Change x to your art category --> <?php query_posts("cat=x"); ?> <!-- End of add --> <!-- Insert "The Loop" part of code from index.php --> <?php get_sidebar() ?> <?php get_footer() ?>
Creating Page
————-
1, Write -> Page
2. Give it whatever title you want to ex. “Art Gallery”
3. On the right side, under Page Template, select the template that you just created.
4. Publish