• Resolved bluen0te

    (@bluen0te)


    I love the plugin and theme.

    I did a search for this topic and while I did find something related, I want to be sure I’m referring to the same thing in hopes of finding a solution.

    I am redesigning an existing and well-established site to the Author Theme and plugin. It’s extremely important to keep the exact URL for product pages. Otherwise, there is a substantial risk of losing visibility in search results. I realize implementing 301 redirects is a solution that’s usually good enough, but not in this case.

    For example, must be able to change:
    example.com/book/lesson-bundle/ (the permalink URL this plugin creates)
    to
    example.com/product/lesson-bundle/ (the URL of existing site)

    Currently, the plugin doesn’t allow the change from “book” to “product”.

    The ability to match URL’s of an existing site is an extremely important and fundamental feature to have in this plugin. It also greatly increases the chance that someone with an existing site will use it.

    Does anyone have a solution to this until the way above-average developers have the chance to update the plugin?

    • This topic was modified 3 years, 8 months ago by bluen0te.
Viewing 7 replies - 1 through 7 (of 7 total)
  • There is a way to change the slug if you haven’t made any custom changes to this plugin. Try adding this code to your functions.php file:

    ‘add_filter( ‘genesis_author_pro_archive_slug’, ‘custom_author_pro_archive_slug’ );
    function custom_author_pro_archive_slug() {
    return ‘products’;
    }

    add_filter( ‘genesis_author_pro_book_slug’, ‘custom_author_pro_book_slug’ );
    function custom_author_pro_book_slug() {
    return ‘product’;
    }`

    Thread Starter bluen0te

    (@bluen0te)

    Thanks for the reply. While it isn’t working yet, it’s good to know that it’s possible.

    I’ve added the following to the end of author-pro theme’s functions.php :

    add_filter( ‘genesis_author_pro_archive_slug’, ‘custom_author_pro_archive_slug’ );
    function custom_author_pro_archive_slug() {
    return ‘products’;
    }
    
    add_filter( ‘genesis_author_pro_book_slug’, ‘custom_author_pro_book_slug’ );
    function custom_author_pro_book_slug() {
    return ‘product’;
    }

    I’m assuming I shouldn’t edit the Genesis functions.php Any idea what I’m missing?

    Thread Starter bluen0te

    (@bluen0te)

    I was able to get this to work after (admittedly) looking at your response more carefully.

    Thank you for your help snowbelly

    I have the same question.

    And after I added this (which works for the slugs):

    add_filter( 'genesis_author_pro_archive_slug', 'custom_author_pro_archive_slug' );
    function custom_author_pro_archive_slug() {
    return 'products';
    }
    
    add_filter( 'genesis_author_pro_book_slug', 'custom_author_pro_book_slug' );
    function custom_author_pro_book_slug() {
    return 'product';
    }

    … I now have the problem to see the content. It’s only generation 404 when I click on it. Any ideas?

    Ah, now it works: I had to manually update the permalinks setting (didn’t change anything, just saved them again), and now it works. ??

    Struggling with this too, tried the code as suggested, trying to move from book/s to client/s

    Added the code to /author-pro/functions.php

    // rename custom post type books to clients 
    add_filter( ‘genesis_author_pro_archive_slug’, ‘custom_author_pro_archive_slug’ );
    function custom_author_pro_archive_slug() {
    return 'clients';
    }
    
    add_filter( ‘genesis_author_pro_book_slug’, ‘custom_author_pro_book_slug’ );
    function custom_author_pro_book_slug() {
    return 'client';
    }

    Updated permalinks a few times , tried creating new books to see if it only changes new ones ..

    Nothing I have attempted seems to do the trick .. Any ideas ?

    Thanks!

    @stumaxuk Try moving this code to your main functions.php in your theme files, instead of modifying the actual plugin functions.php. The theme file should hook into the plugin and you shouldn’t need to modify the plugin code itself.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Editing the “/book/ permalink’ is closed to new replies.