In rails I can have pretty urls like
http://mydomain.com/posts/2234-the-title-of-the-post
where Rails only cares for the numeric id, 2234 in the example above.
For example,
...posts/2234-the-post and .../posts/2234-whatever
get the same page.
How can I achieve the same in Wordpress? This is:
Each post has a unique numeric id
Wo...
I have a custom post type called 'real-estate' and a bunch posts (listings) within it. What I'm trying to do is create a handful of home styles and within them, specific listings of available homes.
So right now, I have the search query pulling in only the home styles from the search by only showing results with the custom field "model...
How would one go about adding a custom page to a wordpress installation via a plugin. For instance the plugin adds a new page_template, the user creates a blank page using that template and the plugin populates the information there?
...
Hi everyone,
Curious if any of you have a good solution for the following situation... because I've never thought of anything myself and usually have to resort to custom fields like "post-image-1" through "post-image-10" and manually paste the file name of a jpg in. Which is a horrible solution and only works for tech savvy posters.
Ba...
I would like to display some values from custom tables in wordpress. This is what I've got so far. I am not sure this is all completely correct.
function pr_forms() {
global $wpdb;
$table_name = pr_table_name();
return $wpdb->get_results( "SELECT id,name,place FROM $table_name" );
}
This will return multiple rows as an a...
I need
few Wordpress sites for testing purposes.
It would be great if I can use only one db
but I need few wordpress codes/instalations (because I need different settings and plugins for each site.
Can I have all that running on one mySQL db? Would use the same db_name, db_user, db_password, etc… and the only thing I change for the...
i using word press, and i try to learn it,
but is see the code which i didn't understand
$post = &get_post($id);
i see '&' before the get_post,
what is '&' meaning?
thank
...
function theme_based_on_domain( $template = '' ) {
if ( preg_match( '/\S*\.?mydomain\.com/', $_SERVER['HTTP_HOST'] )) {
$template = 'ImpreZZ';
}
return $template;
}
add_filter('stylesheet', 'theme_based_on_domain');
add_filter('template', 'theme_based_on_domain');
I have this in my theme directory right now and the ...
Hi,
I would like to get last inserted id after $wpdb->insert().I got a solution with $wpdb->insert_id(); but unfortunately which retrieves the primary key plus an additional zero.
ie, consider my primary key (or inserted id) is 2 $wpdb->insert_id(); retruns 20 .whats wrong with this method?anybody can please help me.
...
I have installed latest wordpress version on my WINDOWS 2003/IIS server, which has PHP support enabled. All goes well except few things:
When I am trying to update a plugin automatically from wordpress dashboard, then it gives me this error "Could not remove the old plugin. Plugin upgrade failed."
I tried to edit CSS of my theme, but w...
Hi, I need to read out posts and maybe write back comments to a WordPress blog.
I found some documentation on their API's XML-RPC and AtomPub.
But what would be the recommended way to go. XML-RPC seems more documented, as far as I can see.
Any experiences/recommendations?
...
Hi there!
I am using popularity contest for wordpress in a self-hosted website.
Is it possible to the popularity contest only track the posts from a specific category?
Thanks in advance.
...
I wasn't sure how to word this question, so i'll just explain.
I want my form at www.blog.com/got-a-question/ to be sent to a verify.php however when I do it sends it to a non-existent www.blog.com/got-a-question/verify.php
Where and how exactly do I direct to the verify page?
...
Is there any existing alternative on XCloner for Joomla or WP?
Sultan
...
Hi guys and gals, here's one for the brightest of you:
I've built a huge dynamic child page lister.
I have 3 levels, here's an example:
Parent
child
sub child
sub child
child
child
sub child
sub child
Here’s how it needs to work:
When on the parent, show this:
Parent (current)
child
child
child
When clicked into the ch...
I build a webisite with wordpress and i want to show my website to other client computers
I run xampp server at server computer
How can i do for that?
plz answer quickly..**
...
So I've been asked to take over another persons code in WordPress with little time before launch date... Usually I would say no but it's an interesting project. I am a pretty good Drupal programmer but have little experience in WordPress.
So I want to know, what is the difference between developing a Drupal module and a Wordpress plugi...
I've created a calendar plugin and now I want to show a event list in one of my templates.
The code I'm using now, is this:
include_once(WP_CAL_PLUGIN_DIR.'eventcal.class.php');
$calendar = new EventCalendar();
$events = $calendar->getMultipleEvents('5');
(...)
<table>
<?php foreach($events as $event) : ?>
<tr>
<td><span><?php ...
I've been trying struggling over the last 2 weeks to find a viable way to configure a Wordpress installation as a membership directory that pulls information from user profiles (custom and default) and displays it in a presentable (possibly sortable) format.
Initially, something along the lines of the Sobi2 plugin for Joomla! was search...
Hi folks,
I've tried the following method within a plugin:
get_post_meta($featuredPosts[$i]->ID, "Thumbnail", true);
within the following plugin code:
$featuredPosts = new WP_Query();
$featuredPosts->query('showposts=5&cat=1');
for($i=1; $i<=$featuredPosts; $i++) { // second for() loop for post slides
while ($featuredPosts->h...