Tag Info

New answers tagged

0

I use this plugin to create different feeds for different categories, but it can also get around the problem of having a URL stuck once you've created the page. You can use the Quick Page/Post Redirect Plugin so that instead your users can type something more manageable and redirect to the desired page: example.com/blog [redirects to] --> ...


1

The procedure is thorooughly documented in Codex under Moving a Root install to its own directory. You misunderstand the point about changing URLs in it, and yes terminology sucks. They only URLs that will change are those that are based of "WP address". That would be WordPress core, essentially admin part. All content URLs are based of "Site address", ...


0

Okay, here is how it is done: Move wp-*, index.php, .htaccess to your new wordpress folder Edit wordpress/.htaccess: Find this line: RewriteRule . /index.php [L] Make it: RewriteRule . /wordpress/index.php [L] Create a new file in /path/to/www called .htaccess then add this: RewriteEngine on RewriteRule ^$ https://www.example.com/ [L] <IfModule ...


0

If you set permalink structure to /%author%/%category%/ then it will give you the intended URL structure. But that will be applicable even when you click on single post from the post listing page.


2

Yes it is possible, but there isn't much point in that. The crudest way is to use a filter on the result of getting the 'rewrite_rules' option, and manipulating it by adding the entries you require directly to the array, and then you might need to filter those rules out when the option is updated. The thing is that it is most likely a waste of time as as in ...


1

In this situation I would use the page as a placeholder to configure the sidebars, even though WordPress will completely ignore it on the front end. Just add the page, make sure the slug is trainings, let the client set it up as they need, and then in your template: if ( $trainings_page = get_page_by_path( 'trainings' ) ) { $acf_sidebars_data = ...


-1

This is the filter I'm using: function em_wpml_dbem_taxonomy_category_slug($option){ $lang = get_bloginfo('language'); if( $lang === 'es-ES' ){ $option = 'eventos/categorias'; } else { $option = 'events/categories'; } return $option; } add_filter('pre_option_dbem_taxonomy_category_slug', 'em_wpml_dbem_taxonomy_category_slug');


0

If you have chosen 'Default' Permalinks, .htaccess can be deleted. Doing that in my case solved my problem of Plugins settings page & Updates settings not loading (instead index.php homepage would load).


1

I was able to solve this by defining a rewrite rule: function rewrite_rules($rules) { $newRules = array(); $newRules['states/(.+)/(.+?)$'] = 'index.php?district=$matches[2]'; return array_merge($newRules, $rules); } add_filter('rewrite_rules_array', __NAMESPACE__ . '\\rewrite_rules');


0

Not sure what exactly you want. Can you please elaborate your question a bit more? If you want URLs like www.mysite.com/subfolder/postname (where the subfolder is where your WordPress install is), then just go to Settings > Permalinks and change it to Post Name. EDIT If your WordPress install is in subfolder and you want URLs like ...


0

Problem solved. I was advised to download a fresh copy of wordpress, delete all wp files/folders on my site EXCEPT wp-config.php file and the /wp-content/ folder, and then replace the deleted folders/files with fresh copies. This worked!


0

I solved it. Apache server doesn't allow VHosts pointing to outside /var/www. So I changed all (Document root AND Directory) to /var/www/site and it worked on all sites, with permalinks working fine.


0

Well, if your /%postname%/ part stays the same, .htaccess redirection can help you pointing old urls to the new ones like this: RewriteEngine On RewriteRule ^$ /my-articles [R=301,L] Put this into your .htaccess file and it should redirect http://your.tld/my-article to http://your.tld/my-articles/my-article. Beware that this will redirect everything, not ...


3

I use template_redirect hook for this purpose. I suppose rented in your question is not taxonomy itself, but one term of some taxonomy. function my_page_template_redirect() { if( is_singular( 'rentals' ) && has_term('rented', 'your taxonomy name') ) { wp_redirect( home_url(), 301 ); exit(); } } add_action( ...


0

Select Custom Structure in permalinks and add /%category%/%postname%/ after your domain. Adding "/" to the category base doesn't work, you have to add a period/dot. I wrote a tutorial for this here: remove category from URL tutorial


0

The option for setting the url to none using "Attachment Display Settings" is available through the gallery option, using "Add Media". How are you adding your images—through featured image or directly in your post/page? You can remove the my image if it's in the post itself. For featured images, you'll have to go into your template file and remove the link ...


0

Please go Dashboard > Settings > Permalink and click Save button.


1

You could use this search and replace tool: search and replace by interconnectit Apart from that you could put some redirects in your htaccess, but really the search and replace works great.


0

If you need to change the permalink structure, it can be done in admin panel. Go setting -> permalinks and chose what you need in general settings


0

index.php is not the template for the homepage, it's the fallback template. Right now every page you load is falling back to the catch all index.php template, but your index.php doesn't have a main loop, and isn't set up as the fallback catch all template. Instead it's doing its own new query and displaying the results. So no, you're not being redirected to ...


0

OK, well, I've put the search for a proper answer on hold and instead cobbled together a 'for now' solution. First, in the referring page that is linking to the individual Post page, I've added this: $theid = $post->ID; echo "<li><a href='"; the_permalink(); echo "?id=" . $theid; echo "'>"; echo "blah"; echo "</a>"; So, on line 1 of ...


1

There's an array option when creating a custom post type and custom taxonomy for ""rewrite"" and you can set a ""slug"" and it's there that you can change your permalink structure. For more read here. Also the other option that I get from post 1 and post 2 one helped me blink some idea. 1 Rewrite rule: You need to add a new rewrite rule so Wordpress knows ...


0

I had the same case and I was going crazy and tested Disable canonical redirection for this case and worked. Maybe this will also help I'm not sure if this would be the best way to do this , however. function no_canonical( $url ) { return false; } function adjust_show_request( $request ) { if ($request->query_vars['post_type'] === ...



Top 50 recent answers are included