I'm moving a locally developed wordpress site to a client's server so I'm trying to export the local database and import it to the server. I exported the .sql file according to the instructions here http://codex.wordpress.org/Backing_Up_Your_Database but I keep getting this error when importing:
DROP TABLE IF EXISTS `wp_commentmeta` ;
...
I am developing a small plugin which appears in the post page and it has a touch of Ajax.
$("#some-div").ajaxStart(function(){
$(this).html('Loading...');
});
$.post(
AjaxHandler.ajaxurl,
{ action : 'wt4-cats', },
function(response) {
//do some stuff
});
thing is that W...
I am using WPMU but there are some options that the administrator should set and should take affect for every user of the website. Does wordpress have a place to store these global options? Can anyone point me to sample code?
Thanks!
...
I have a Wordpress website that needs to display a 3rd party newsletter signup form. This sign-up form has lots of fields and takes up its own full page.
I want to display a simple "enter email address, hit submit" form at the top of every page. When the user hits submit, it should take them to the full form, where their email address...
I am trying to show a custom css depending on user permissions with a function like :
<?php
if ( !current_user_can( 'install_themes' ) ) { ?>
<link media="all" type="text/css" href="<?php bloginfo( 'template_directory' ); ?>/library/styles/customAdmin.css" rel="stylesheet">
<?php }
Perhaps I am being dense about this but I want to do...
I want to run an instance of wordpress within my rails app. I currently have wordpress files housed in public/wordpress, but I need to configure my .htaccess file to allow both types of requests. How do I do that? currently, .htaccess is:
General Apache options
AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteRule ^$ index.html [QS...
I already created a wordpress widget for adding some featured from admin panel.I need to redirect to another page from this widget.But,when i am try to use header() method which shows a warning some thing like header already send by output....an do on.Is there any other method to redirect from wordpress widget?Please help me
...
In my theme, there's custom page for the login. Login function at functions.php is like this
function log_in($username, $password) {
$user = parse_user($username);
$username = $username;
$password = $password;
if(isEmptyString($username)) return new WP_Error('username', 'required');
if(isEmptyString($password)...
Hello,
I want to show user's post count from specific category. Currently, I can only be able to query all posts. My code is like this
<?php $userpost_count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type ='post' AND post_author = '".$curauth->ID."'");?>
<?php echo "<span>Total post: </b>...
This is in wordpress (not sure that makes a difference)
This bit of php outputs the post title
<?php echo $data['nameofpost']; ?>
It's simple text which can be anywhere up to 100 chars long. What i'd like is if the chars outputted are over 20 long to display '...' or simply nothing at all.
Thanks
...
Hi,
I’ve throughout the last couple of years downloaded a lot of templates for websites and these are now starting to become chaotic in the different folders so I’m starting to get a overview of the different templates.
Regarding to this I was thinking about the way that WordPress displays the different themes installed in the themes f...
Hey Guys & Gals,
I recently moved my WordPress website to a subfolder. I want to add a redirect in the .htaccess file so that the links to images I've uploaded originally to ~/wp-content/uploads/ will pass to ~/blog/wp-content/uploads. The .htaccess file must remain in the root folder for WordPress to read it properly. This is what I tr...
Hey
What I want to do is to include one of my PHP scripts in a Word Press theme. The problem is that after I include the script file I can't access, inside functions in the theme file, variables declared in the script file .
I have created a new file in the theme folder and added the same code as in header.php and if I open that file i...
I need to build a solution which will allow registered users of a Wordpress site upload videos to the server and have them moderated before being published on the site.
Failing that, I would like to let users upload their file, then the Admins would check the video is appropriate, upload it to youtube, and manually embed it into a post...
Hey
Recently I'm interested in post's structure of Wordpress.
They use a table named (wp_posts) and in this table they saved 3 related fields such as :
post_title
post_name
guid
It's clear that they save title of each story in post_title field ,
and slugs in post_name ,
and full url of a post in guild filed .
But where the hell...
I'm using the following code to display a 'previous posts' link on my Wordpress blog.
<nav>
<ul>
<li><?php previous_posts_link('Newer Entries »') ?></li>
</ul
</nav>
Problem is, when there ARN'T any previous posts, while the link doesn't display, I still get
<nav>
<ul>
...
Hello
I have a drupal installation in the root directly of my domain with clean urls enabled.
I also have a sub directory with wordpress installed. /blog/
I also have a sub directory with php scripts in it /utilities/
When I type in "http://www.domain.com/blog/a-post/" I get a 404 error from Drupal telling me that the page does not...
Hello,
I have a posting form at my theme. I used wp_insert_post there. My code looks like this
$post = array(
'ID' => '',
'post_author' => $post_author,
'post_category' => $post_category,
'post_content' => $post_content,
'post_title' => $post_title,
'post_status' => 'publish',
);
$post_id ...
I've just followed this example from Wordpress and I have successfully added an extra Meta Box in Post interface, and the value is stored in DB.
Now my question is, how can I retrieve and display the content of this meta box?
I'm trying the following code:
$intro = get_post_meta($post->ID, 'post_intro', true);
echo $intro;
But I...
I uploaded my wordpress site from my Local host to a folder off my main domain (http://example.com/folder) using this tutorial http://www.webdesignerwall.com/tutorials/exporting-and-importing-wordpress/
(im working on a mac)
Everything went ok - admin panel is fine homepage is fine etc - only any page apart from the homepage redirects...