Updating URLs in many posts

Use the script found here: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ Because WordPress serializes some urls in option and meta tables a simple replace won’t do. A siple replace will break your data. This script will preserve your data and replace it with a new url. I use it al least twice a month.

How to allow — in category name

The — to an mdash conversion happens inside wptexturize() http://codex.wordpress.org/Function_Reference/wptexturize which is applied to many things (including taxonomy titles and other functions output. Look for places you might want to remove the filter from in wp-includes/default-filters.php and remove the filter with the remove_filter() function: http://codex.wordpress.org/Function_Reference/remove_filter

How do I link to a blog not set as the homepage?

The permalinks by default are output relative to the site’s blog posts index (aka ‘page-for-posts’, aka posts page). You’re using a custom page template for the static page Section/News. That static page is unrelated to the site blog posts index. That’s why the permalinks don’t reference that page. If you want your permalinks to reference … Read more

What is the correct way to convert the absolute path of the executing script to a URL, in WordPress?

Call get_stylesheet_directory_uri() for the current theme, or get_template_directory_uri() for the parent theme of a child theme, and append your file paths to that. $url = get_stylesheet_directory_uri() . ‘/images/my-icon.png’; $url = get_template_directory_uri() . ‘/images/my-icon.png’; Edit: To determine whether you’re in a plugin, a parent theme or a child theme, compare the folder you’re in (via dirname(__FILE__)) … Read more

How can I replace my primary url globally with a parked one?

You should change all occurences of this url in database. To do it you can: Export database to SQL Use some text editor to find&replace all occurences of http://ex-ample.com to http://example.com Import this new database to server. The other option is to use http://wordpress.org/plugins/search-and-replace/ and replace all http://ex-ample.com occurences. This article should be helpfull too: … Read more

WordPress not opening posts with only numbers if permalink is post_name

Sorry I didn’t follow up on this. You mentioned you weren’t using date archives. You can change the date archive structure to remove the conflict with /%postname%/: function wpa_change_date_structure(){ global $wp_rewrite; $wp_rewrite->date_structure=”date/%year%/%monthnum%/%day%”; } add_action( ‘init’, ‘wpa_change_date_structure’ ); So now after permalinks are flushed, date archive URLs will be prefixed with date/, so numeric postnames will … Read more

Set a custom URL for image in the Media Library?

Sharing my thoughts on multiple issues you mentioned. Hoping one or two of the following would help… Firstly, you may visit your site’s wp-admin/options-media.php and uncheck the option “Organize my uploads into month- and year-based folders” Why can it only be attached to ONE post/page? An image can be attached to any number of posts … Read more

How can I change a plugin’s URL?

For changing the slug, replace the line: ‘rewrite’ => true, at otw-portfolio-light.php inside $args = (…..); for register_post_type( ‘otw-portfolio’, $args ); with: ‘rewrite’ => array(‘slug’ => ‘new-slug’), note: this will be overridden on plugin update additional you might have to go to Dashboard > Settings > Permalinks and save to make changes appear

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)