Tag Info

New answers tagged

0

I resolved the problem - we're using the Zemanta Related Posts and somehow that was adding references to missing thumbnail images with src="yes" and src="no". Regenerating the missing thumbnail images got rid of this problem.


2

Have you repub'd your permalinks? This will update the .htaccess file to ensure that routing works appropriately.


1

This ended up doing the trick. function auto_hashtag( $menu_item ) { if ( ! is_admin() && $menu_item->post_parent > 0) { // url $url = $menu_item->url; $menu_item->url = preg_replace('!/([^/]+)/$!', "/#\\1", $url); } return $menu_item; } add_filter( 'wp_setup_nav_menu_item', 'auto_hashtag' );


0

What you are trying to do seems like a bad idea; the # symbol is used at the end of a URL to denote an anchor position for the website to scroll to. Take for example this very page with this link: Add # to submenu URLs automatically When clicked, it moved the screen down to the <div> tag with an id of post-form. In the example you give ...


1

In WordPress, URLs don't map to routes. They map to database queries. When using WordPress in the "default" permalinks mode, you have a set of variables in the main URL query, like ?p=1 or ?page=234 and so forth. There's also ?s=search and many others. If you use the "pretty" permalinks, then a big set of rules called the "rewrite rules" is created which ...


0

You can hook onto add_attachment and force the slug to work off the filename like so: Update: To uppercase the slug, you'll need to add a temporary filter onto wp_unique_post_slug. You can't simply use strtoupper( $slug ) as WordPress sanitises (lowercases) it within the update function. /** * Force attachment slug to ignore title from metadata (if any). ...


0

Not sure if you are asking how to do this, but it's a setting in Settings > Permalinks. You would select the Day and Name option. This should automatically format your Post articles in this format.


2

By far the easiest fix is to edit wp-config.php to define two constants. (s)FTP into your site, or use a host supplied file manager, and add: define( 'WP_SITEURL', 'http://www.abc.com/folder' ); define( 'WP_HOME', 'http://www.abc.com/folder' ); Those will be used instead of the information in the database. That will get your site up and running again. ...


1

There is an article on the Codex that explains how to fix this in great detail: http://codex.wordpress.org/Changing_The_Site_URL


0

I think the easiest way to handle this is to take the script from https://interconnectit.com/products/search-and-replace-for-wordpress-databases , unzip it and copy the PHP file into your WP folder, call it with the direct URL - http://www.abc.com/folder/customnameofscript.php and do the following: First, PLEASE CREATE A BACKUP OF YOUR DATABASE, just in ...


2

What about something like that? function wpse139657_orderby(){ if( isset($_GET['orderby']) ){ $order = $_GET['order'] or 'DESC'; set_query_var('orderby', 'meta_value_num'); set_query_var('meta_key', $_GET['orderby']); set_query_var('order', $order); } } add_filter('pre_get_posts','wpse139657_orderby'); In this way ...


0

On a very basic level, sub-pages inherit the URL segment of their parent page. A bit more complex, when creating custom taxonomies and custom post types you can define their slug for the WP rewrite engine. The documentation: http://codex.wordpress.org/Taxonomies#Custom_Taxonomies Neither is exactly what you're looking for... Writing to .htaccess wouldn't ...


0

I think this a better version of aalaap's answer: // In your template ... $avatar_url = get_avatar_url ( get_the_author_meta('ID'), $size = '50' ); // Get src URL from avatar <img> tag (add to functions.php) function get_avatar_url($author_id, $size){ $get_avatar = get_avatar( $author_id, $size ); preg_match("/src='(.*?)'/i", $get_avatar, ...


0

You actually already were pretty close: function autoblank($text) { $return = str_replace('href=', 'target="_blank" href=', $text); $return = str_replace( 'target="_blank" href="' . get_site_url(), 'href="' . get_site_url(), $return ); $return = str_replace('target="_blank" href="#', 'href="#', $return); return ...


-1

Move this one page into the "root" of pages - set it's parent to (no parent)



Top 50 recent answers are included