Tag Info

Hot answers tagged

6

Hi @JM at Work: Try this in your theme's functions.php file, or a .php file of a plugin that you may be writing: add_action('init', 'xxx_init'); function xxx_init() { add_action('save_post', 'xxx_save_meta_box'); } function xxx_meta_box_callback() { add_meta_box('xxx-meta','xxx Details','xxx_meta_box','xxx-post-type','side','default'); ...


4

mod_deflate: Not detected (required for Page Cache (enhanced mode) and Browser Cache) mod_env: Not detected (required for Page Cache (enhanced mode) and Browser Cache) mod_expires: Not detected (required for Page Cache (enhanced mode) and Browser Cache) mod_headers: Not detected (required for Page Cache (enhanced mode) and Browser Cache) mod_mime: Not ...


4

If the theme was coded using Theme Development Standards, then you can use the function wp_deregister_script to remove conflicting scripts from the page where the slider is being used. [update] The original solution (at the bottom) worked in a specific plugin situation (with WP Touch). I think this is the proper one: add_action( 'wp_enqueue_scripts', ...


3

Given that the readme.txt was ok and there was no apparent problem with the image files, I'm inclined to think it was a bug in the system, and in such cases it should be reported to plugins@wordpress.org. Anyway, since december 2012, the root folder /assets[1] is being used to store the screenshots files as well as the header images (or banner files). The ...


3

add this to your feed $rss = fetch_feed( $url ); if ( is_wp_error( $rss ) ) { echo $rss->get_error_message(); <---this } else { // do your stuff here } I would also suggest installing the debug toolbar extensions, like "debug-bar-extender".


3

If you didn't hand-change the wpurl in the dev database, what probably happened is that you entered your url, and WP made a 301 redirect to the live site. Then, without realizing it, you changed the url config in your live site. To make it work: Put this in your wp-config.php define('WP_SITEURL', 'http://your-wp-url.com'); define('WP_HOME', ...


2

After you moved the database to new hosting server, go to the wp_options table. see the row of that table. you can see this siteurl -> http://domain.com (old domain). change to new domain url. Go to the row number 37 with option_id = 37. Here you can see the home -> http://domain.com (old domain). change to new domain url. Now go to the site and see. ...


2

Short answer: No, WordPress doesn't care about pastebin in particular and doesn't do any sort of filtering like you're describing. Long answer: Your host is doing it. Step 1: Ask your host if they have mod_security enabled and what their filtering rules are. Step 2: Try pasting the same link via a comment or something. If it's being blocked on any POST ...


2

There are a few things you can do: Use the Debug Bar plugin http://wordpress.org/extend/plugins/debug-bar/ Set WP_DEBUG to true in your wp-config.php file if you are looking for problems in a theme or plugin I created a plugin that allows you to dump any variable into the Debug Bar plugin: http://wordpress.org/extend/plugins/kint-debugger/ You should look ...


2

What you have: <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/style.css"> should work fine. I've copied and pasted into my header.php and it worked. But this is not how you should be including css or javascript files. The proper way is to use the wp_enqueue_scripts hook. For instance, say you have javascript ...


2

To debug a hook look into the associated actions and filters. They are listed in $GLOBALS['wp_filter']. Sample plugin for debugging <?php # -*- coding: utf-8 -*- /** * Plugin Name: T5 Debug Hook * Description: Adds a list of registered filters and action for a hook. Call a page with <code>?hook=NAME</code> to see it. */ add_action( ...


2

The .htaccess does not have the information for caching so clear cache, network deactivate your caching plugin as well as the nivo slider plugin. If present, remove the setting for enabling caching in wp-config too. Does /wp-admin.php load for that blog at this point? If not, using phpmyadmin go into wp_blogid_options to see what is being loaded. You can ...


2

Disable the Nivo Slider plugin to confirm that this is the source of the session_start error. This would definitely cause a white page. I'm looking at the plugin's source and there is no session_start function, so that's a bit odd. Is your plugin up to date? As the error says "headers already sent (output started at /.../wp-settings.php:65)". This leads me ...


1

Probably you dont have any mail server installed/enabled (like sendmail/qmail/postfix) in your local machine. You can still reset your admin password from database. The table "wp_users" stores the password in the "user_pass" field You can just replace the value with a md5 hash value of your desired password for the admin user. Note: This is good for ...


1

You can reset the password via code also. Below are the steps: Paste the below code in your active theme's functions.php file. wp_set_password('password',1); Put in your own new password for the main admin user. The "1" is the user ID number in the wp_users table. http://codex.wordpress.org/Resetting_Your_Password


1

On the current theme, there was no page.php file present, so WordPress was reading index.php and, according to the theme's instructions, displaying the_excerpt(). It will strip many tags, including <video>, and that's exactly what was happening. The content of the posts is is displayed based (mainly) on the contents of the file single.php, but for ...


1

use single quotes outside of the following statement, why you are getting this error because you are using double quotes for class attribute "</span><span class="meta-sep">|</span>" and also wrapping it in double quotes. replace this "</span><span class="meta-sep">|</span>" with '</span><span ...


1

The problem is not with the "select top 0", but the way the query is changed behind the scenes. Even if you change it to "select * from...", it will break. I managed to get this working by going to "wp-includes\query.php" file, and then removing the $limits variable from the query. This is not the best way to fix the problem, but will get the site working. ...


1

It's likely a plugin. Disable them, and see if that fixes it. If it does, enable one by one, until you find the culprit. If it's not a plugin (and even if it is), you can try to increase the memory allocated for PHP. Add this to your config.php: define('WP_MEMORY_LIMIT', '64M'); You can read more about the memory limit here: ...


1

This: <nav> <?php wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); ?> </nav> . Should be: <nav> <?php wp_nav_menu( array( 'theme_location' => 'main-menu', 'menu_class' => 'main_menu' ) ); ?> </nav> The css: .main_menu { font-size: 14px; // example } . Learn more here: wp_nav_menu ...


1

A little tricky to say by looking at code alone. The first thing you need to check in such cases - if your validation function receives data from submitted form. var_dump() input and die; right after that to stop execution and prevent redirect back. Depending on what you get there (if anything) check back through Settings API functions. There are a lot of ...


1

Your site codereflect.com is not that heavy. Could be the Suffusion theme and its options making lots of DB calls. I'd use http://wordpress.org/extend/plugins/debug-queries/ to see what queries are being called and how many. And it also could be you're on a shared box at softlayer that is "too" shared with others.


1

You can't really debug server errors without having really good access to the server itself. This would entail looking at the internal working of this particular host which I'm certain they would not allow nor spend any actual time trying to fix. Move to a better host if they cannot give you more details as to what the problem is or ask for access to the ...


1

I had the same issues, after some time of not touching the site it suddenly started producing "500 Internal Server Error" on various pages. After a week of pulling my hair it turned out that my "/wp-content/debug.log" (which I enabled a long time ago and then forgot about) was over 128 MB, and therefor could not be written to for some reasons, hence all ...


1

When migrating you need to change all references of the previous domain in the database. I recommend using the migrate db plugin: http://wordpress.org/extend/plugins/wp-migrate-db/ As well as Daniels Advice to modify the WP_SITEURL, WP_HOME constants. Then when you finally can login again. I recommend if you had permalinks turned on to turn them off and ...


1

If you already have the files sitemap.xml and (if you have gzip enabled in Simple Google Sitemap) sitemap.xml.gz in the root directory of your WordPress installation, try deleting them and create new empty files with the correct permissions for that plugin, then manually run the sitemap generator. If these files don't exist, try creating the files. Here's ...


1

The featured image meta box is enabled under following conditions: if ( current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports( $post_type, 'thumbnail' ) && ( ! is_multisite() || ( ( $mu_media_buttons = get_site_option( 'mu_media_buttons', array() ) ) && ! empty( $mu_media_buttons['image'] ) ) ) ) ...



Only top voted, non community-wiki answers of a minimum length are eligible