Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author Brandon Allen

    (@thebrandonallen)

    It’s working in 3.8.1. No redirects are performed, so any links to https://example.com/author/author-slug/ will 404. Any links to https://example.com/people/author-slug/ should work. It’s hard to say what’s going on without more info, but I’ve not had any other reports that it’s not working with 3.8.1.

    Thread Starter tk421jag

    (@tk421jag)

    Thank you for replying so quickly.

    I’m actually getting ‘people’ to show up, which is great.

    I’ve got it set to show firstname-lastname, but I’m getting a 404. I’ve tried keeping it to just the default, using the username, and I still get a 404.

    There are no other plugins that would be interfering with this as this is a fairly fresh install.

    I’ve got my permalinks set to https://mywebsite.com/sample-post/

    Any ideas would be great. Thanks so much for your help.

    Plugin Author Brandon Allen

    (@thebrandonallen)

    I’ve got it set to show firstname-lastname, but I’m getting a 404. I’ve tried keeping it to just the default, using the username, and I still get a 404.

    This could be the problem. In it’s current form, Edit Author Slug doesn’t update user slugs from username to firstname-lastname when you set the auto-udpate setting. Updating only happens when the user updates their profile. So, in your case, Say you have a user named John Smith, with a username of iamawesome. The link example.com/people/john-smith/ won’t work, but example.com/people/iamawesome will work. If you’d like the new example.com/people/john-smith to work, you need to go into each user’s profile, from the dashboard, and explicitly change it. If John Smith later changes his name to John Barleycorn, his author slug will be updated, and his new author link will be example.com/people/john-barleycorn. A bulk upgrade feature is in the works to make this easier, but I have no eta at the moment.

    If you’d like to manually type a link to see if it’s working, you can do this:

    1. make note of your author base on the Edit Author Slug settings page
    2. go to your profile page in the dashboard, and scroll to the bottom to the “Edit Author Slug” section
    3. make note of your current author slug
    4. craft your url as so, example.com/author-base/author-slug

    This should give you a working url.

    Thread Starter tk421jag

    (@tk421jag)

    Thanks for these instructions. We’ve tested this several times on our end and have not gotten it to work with 3.8.1. We’ve run through your instructions above several times with no luck.

    example.com/people/author-slug still doesn’t work for us. ?? Doesn’t matter what configuration the username is. We’ve tried the default username, firstname-lastname, but nothing works.

    As soon as we deactivate the plugin, we can get back to the default author path: example.com/author/author-slug

    I’ll keep working on it, but I can’t imagine what the issue would be.

    Thread Starter tk421jag

    (@tk421jag)

    Update -> We were able to get this URL to work using this plugin:
    example.com/author/firstname-lastname

    But as soon as we changed “author” to “people”, it stopped working.

    After changed the slug we visited the users page and saved that. Then visited permalinks page, just in case. But we still got a broken URL with this format:
    example.com/people/firstname-lastname

    So removing “people” and going back to the default “author”, but keeping firstname-lastname works.

    example.com/author/firstname-lastname

    Plugin Author Brandon Allen

    (@thebrandonallen)

    How are you getting the links? Are you typing them in manually, or are you using a function like get_author_posts_url() to output a link?

    Thread Starter tk421jag

    (@tk421jag)

    We are manually typing them in to the browser, which should work. Right?

    Not using any functions. At least not yet. We’re just trying to get the URL structure set throughout the website before doing any major development.

    Plugin Author Brandon Allen

    (@thebrandonallen)

    It shouldn’t, necessarily, I’m more just trying to get a baseline. Okay, I have two separate things to try.
    1) Depending on your theme, you may not be getting an actual 404. If the user, who’s page you are visiting, is not the author of any posts, the theme may make it appear as a 404. It could even throw a 404, although this is technically incorrect (the user and it’s url actually exist, there’s just no content to display). So make sure each user you are testing has at least one post where they are attributed as an author. This is only for testing, and is not required in production. Once you confirm the links are working, you can go about development, and handle the ‘no posts’ scenario as you wish.

    2) create a test page, and the add the following to your theme’s functions.php. Make sure to change the line if ( !is_page( 'test-page' ) ) { to match the theme slug of your test page. For simplicity, you can just name your test page, “Test Page”, and you’ll be all set.

    function ba_append_wp_list_authors_to_the_content( $content ) {
    	// Only show on test page
    	if ( !is_page( 'test-page' ) ) {
    		return $content;
    	}
    
    	// Set up args
    	$args = array(
    		'echo' => false,
    		'hide_empty' => false,
    		'exclude_admin' => false,
    	);
    
    	// Get author list
    	$author_list = wp_list_authors( $args );
    
    	// Return the_content with author list appended
    	return $content . $author_list;
    }
    add_filter( 'the_content', 'ba_append_wp_list_authors_to_the_content' );
    Plugin Author Brandon Allen

    (@thebrandonallen)

    Sorry, I posted before I finished my though. Once you have the above code, you can visit the test page, and you should see a list of all the users linked to their author page (example.com/author-base/author-slug/). From here, make you settings changes in the Edit Author Slug settings page. Refresh your test page, and you should see updated links. Now you can click on these links to see what happens. Hopefully, you should reach a working url. From there, we can further troubleshoot if necessary.

    Thread Starter tk421jag

    (@tk421jag)

    Ok, followed your instructions. I do get a list of authors on the test-page. And they are showing the correct link slug I’m going for:

    example.com/people/firstname-lastname

    However, I’m getting that annoying 404 when I click on any of them. :-/ Each one of these authors has a post published on the website. Several actually. And everywhere that the author is listed, it’s showing the correct URL with slug.

    I’ve checked the user profile page, and visited the permalinks page.

    Am I missing something?

    Plugin Author Brandon Allen

    (@thebrandonallen)

    I’m at a loss. I can’t recreate this, and I’ve not heard of anyone else having this issue. What other plugins are you using? Are you doing any query filtering, or template redirects? What theme are you using?

    Plugin Author Brandon Allen

    (@thebrandonallen)

    Do you happen to have a page named “People”, or a page with a link of example.com/people/?

    Thread Starter tk421jag

    (@tk421jag)

    No filtering, and not template redirects.

    Only other plugin I’m using is Advanced Custom Fields. I’ve deactivated that and we still get the issue.

    This is a custom theme using Foundation framework by Zurb.

    Does this plugin edit or alter any other files that maybe we have protected for some reason?

    Thread Starter tk421jag

    (@tk421jag)

    Nope. No pages or post named ‘people’.

    I’m stumped. I don’t know what would be causing this. Even though we are using a custom theme, it’s using all of the normal wordpress files. Nothing crazy.

    Plugin Author Brandon Allen

    (@thebrandonallen)

    Nope. The plugin only filters the user_nicename slug on insertion to the db, and uses on-the-fly filtering of WP_Rewrite::author_base. Oh, and rewrite rules are changed, in the db, to match the value of WP_Rewrite::author_base. Are you using any object caching?

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Working in WordPress 3.8.1?’ is closed to new replies.