Tag Info

New answers tagged

0

First Assumption: That an extra slash was being added for some reason To see what was going on, I wanted to see what was going on in the array. When I print_r() the array I get the following: Array ( [10] => stdClass Object ( [term_id] => 10 [name] => Mozilla [slug] => mozilla [term_group] ...


0

I would suggest to use Search and Replace utility when you move your WordPress Network. it seamlessly update all the fields of the database from old domain to new domain. After that, you only need to update the domain name in wp-config.php. (Tip: do not include http:// and trailing slash while replacing the domain rather just the domain name e.g. ...


0

In general the pretty permalinks are domain of Rewrite API in WordPress. But they convert the links into query variables for backā€“end PHP side of it. Hashbang links are domain of JavaScript. It is impossible to say how easy would be to change them, without very specific knowledge of how theme's JS implements them.


0

In WordPress website, if you enter number like ABC.com/blog/1232132 then it will redirect to the same page because this number are not come under any category of the permalink. So that when you enter this kind of URL then it will redirect to its current page.


1

Your post_type_link uses the post's ID, but the item query var expects a postname. To query by ID you need to use the p query var and set post_type: add_rewrite_rule('food/([^/]+)/?$','index.php?post_type=item&p=$matches[1]','top');


0

As I've explained elsewhere, you can modify the image sizes of the get_post_gallery() or get_post_gallery_images() with a simple filter: // Add a filter for full gallery size: add_filter( 'shortcode_atts_gallery','wpse_full_size_gallery' ); $gallery = get_post_gallery( get_the_ID(), false ); // Remove the filter: remove_filter( ...


-2

Try Absolute url not relative Example: download.php?filename=http://www.yoursite.com/Test1/index1.html


0

I highly recommend BackupBuddy (a paid solution, from iThemes.com). Recommended non-paid alternative include: the "Duplicator" plugin. the "Better Search Replace" plugin, based upon the excellent interconnect/it script mentioned by 'Privateer'. the "WP Migrate DB" plugin. All of the above properly and automatically handle search-and-replace of URLs ...


0

Just got a solution: Just add this code to your functions.php and replace '_metainfo' by your meta information and 'posttype' by your posttype. function add_meta2url( $link, $post ) { $post_meta = get_post_meta( $post->ID, '_metainfo', true ); if ( 'posttype' == get_post_type( $post ) ) { $link = $link . '#' .$post_meta; return ...


0

This is about a year over due. I have had a similar thing happen on my new word press install. Creating pages dynamically and getting incremental numbers on the slug names. During this process I realised that the original slug would access the last one. ie. ../../dynammic-page would access ../../dynamic-page-4 The solution was in the trash folder! ...


0

As I understand your Question, you need to hook into most of the Link Filters (which are listed here: http://codex.wordpress.org/Plugin_API/Filter_Reference#Link_Filters ) and then add the query to them if the queryvar "clean" is set. Happy Coding, Kuchenundkakao


0

Velvet Blues is what you're after. Also, I'm sure you're probably doing this already, but I probably should say it anyway: it's best practice to discourage search robots from indexing the site while it's on its developmental URL. If you prefer to use a MySQL query instead of Velvet Blues, this should work too: UPDATE wp_posts SET post_content=(REPLACE ...


0

I'd recommend the following: (no affiliation) https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ For some reason I've had odd experiences with the search and replace db plugin recently. Also, I'd avoid using the defines in your wp-config.php file as some plugins do not use it and show strange behavior. Better to update the ...


0

There are few ways to change the URL as you can see here: http://codex.wordpress.org/Changing_The_Site_URL You can either use constants like so in your wp-config.php: define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com'); Or you can change the database. A good plugin you can use is the Search and Replace: ...


0

I think the best way is to use the before_wp_tiny_mce() hook. Then, you can define the url in PHP; and pass it to the page so it is available to TinyMCE. function sgp_before_wp_tiny_mce() { ?> <script type="text/javscript"> var sgp_plugin_url = "<?php echo plugins_url('shortcode_generator_popup.php', __FILE__); ?>"; ...


0

here is the full code to force change theme by a reserved wordpress parameter add_action( 'pre_get_posts', 'my_pre_get_posts' ); function my_pre_get_posts($wp_query) { global $wpdb; // Confirm request is main query if(!$wp_query->is_main_query()) { return; } // Get post name from query $post_name = ...


0

Add these values in your wp-config.php define( 'WP_HOME', 'http://www.example.com' ); define( 'WP_SITEURL', 'http://www.example.com' ); These will overwrite your database values with above. This is a temporary fix. But to fix this issue permanently. You will have to change URLs in database. You can run these mysql queries to change your URLs from ...


1

The code you provided could cause issues with 3rd party URLs in hyperlinks not running https. You can fix this by including your home url, e.g: $content = str_replace( set_url_scheme( home_url(), 'http' ), set_url_scheme( home_url(), 'relative' ), $content); Next, you're applying this when you'd like to display the content, which means you need to do an ...


1

I wouldn't call it a bug, you haven't done anything to place that restriction on the query for your post. It also seems like a fairly unlikely case where random strings will end up in place of your taxonomy terms for this to even present itself. Anyway, the answer is to modify the query via pre_get_posts to add in whatever taxonomy data you need. I don't ...



Top 50 recent answers are included