the_permalink() not working
Usually this is because the “Site URL” field in Settings > General is wrong. It probably says “domain.com” where it should say “domain.com/news”.
Usually this is because the “Site URL” field in Settings > General is wrong. It probably says “domain.com” where it should say “domain.com/news”.
The simple way is to not use the page ID in your permalink. In my WordPress settings, I can set it to take the title of the page as the permalink. In my example below, I use “Post name”.
You could hook into ‘attachment_fields_to_edit’ and just add a row: <?php # -*- coding: utf-8 -*- /** * Plugin Name: T5 Show Attachment ID * Version: 2012.06.04 * Author: Thomas Scholz <[email protected]> * Author URI: http://toscho.de * License: MIT * License URI: http://www.opensource.org/licenses/mit-license.php */ if ( ! function_exists( ‘t5_show_attachment_id’ ) ) { add_filter( ‘attachment_fields_to_edit’, ‘t5_show_attachment_id’, … Read more
You could filter ‘term_link’. just an untested idea, written directly into the answer field add_filter( ‘term_link’, ‘wpse_55476_categore_ur_filter’, 10, 3 ); function wpse_55476_categore_ur_filter( $termlink, $term, $taxonomy ) { if ( ‘category’ !== $taxonomy ) { return $termlink; } // separate the URL $parts = explode( “https://wordpress.stackexchange.com/”, $termlink ); // get the term $term_slug = array_pop( $parts … Read more
I guess permalink structure should be /%category%/%postname%/
This is really an Apache and OS X question and not specifically WordPress, but you may need to edit Apache’s httpd.conf file to allow .htaccess files to work on the one Mac. Go to /etc/apache2/ (That’s for 10.6; Lion may be different) with the Finder’s Go >> Go to Folder… menu item (or via terminal) … Read more
Try this $args[‘rewrite’]=array(‘slug’=>’/%my_service_cats%/’); register_post_type( ‘my_services’, $args); register_taxonomy( ‘my_service_cats’, ‘my_services’, $args);
Items left in your trash will directly affect new permalinks being appended with -$N.
I was bootstrapping WordPress in ics.php by including wp-blog-header.php (which usually works for me), but after changing it to include wp-load.php instead, the files generated were no longer not being found.
I’m about to release a plugin to do just that (and some other things). You’ll have to modify your rewrite rules. This code works for category posts. Perhaps, if you work on it a little bit it will get you the same behavior for post types and taxonomies. First, generate the rules you need: function … Read more