[Resolved] Creating an “About the author”-page for bookstore

Home Forums Support [Resolved] Creating an “About the author”-page for bookstore

Home Forums Support Creating an “About the author”-page for bookstore

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #2032118
    Paul

    Dear GP-Team,
    as we’ve said in this post I am opening a new topic for the following question:

    [What] I wonder about now is if it’s possible to customize the attribute page for every author. Now, on the attribute page [from the WooCommerce shop] there is displayed the author’s name in the title and the products associated with the attribute.
    Is there a way to customize it (Custom post type maybe?), so that I can add a text about the author, an image and also embed WP Show Posts shortcodes? This would be very handy and efficient as I wouldn’t have to create two separate pages for each author: one information page and one extra attribute-page showing the products.

    To sum up, the page should consist of the following components:

    • Title (name of author)
    • Featured image
    • Text about author
    • Products from attributes tag in WooCommerce
    • Texts [Edit: Blog posts] concerning author marked with tag

    The text and the featured image of the author should, on the other hand, also be displayed in the description tab on the product page (For testing purposes, I did this with WP Show Posts shortcode in the private link).

    Is there a way to build a custom post type like this?
    I am new to working with custom post types and php, but I’m willing to learn. Getting this to work would be very convenient in future, as there might be a lot more author pages coming up.

    Thanks for your help and best wishes
    Paul

    #2032147
    Ying
    Staff
    Customer Support

    Hi Paul,

    Not sure I fully understand, are you trying to build a custom static page to replace the term archive page?

    If so, have you thought about using a block element to insert the info the the default term archive page which already has products listed?

    Let me know 🙂

    #2032286
    Paul

    Hey Ying!

    Yeah, I’ve thought about that, but I wasn’t sure if that’s the right way to go.

    In that case, every author would have to have a woo-commerce-product, right? That might be a problem, as I might want to have author pages for authors who only contribute something that is published in the blog.

    Please let me know what you think about it.

    #2032303
    Ying
    Staff
    Customer Support

    And I assume some of the authors who have books to sell in the store don’t write articles for the blog?

    How many authors would there be?

    #2032895
    Paul

    Well, some do, some might, some don’t.
    Also, on the authors page there may be introduced other artists and writers (for example translators of books), who may not be tagged in the Woo Product or artists of an audio book, which will be available on spotify, but not in the store.
    The number of “Woo”-authors is at nine at the moment, but there will be more (hopefully 100+ in the next 2-3 years).
    I added a link to a mockup-page to illustrate approximately what I have in mind.

    #2033242
    David
    Staff
    Customer Support

    Hi there,

    sounds like the future scope could be quite complicated. You may want to look into the Pods plugin or a developer who specialise in that as it will allow you to create custom content types and many to many relationships.

    https://en-gb.wordpress.org/plugins/pods/

    For simply adding some additional stuff to the Attribute archive.

    You can use a Block Element – for example the Page Hero Element type:

    https://docs.generatepress.com/article/block-element-page-hero/

    The Post Title can retrieve the Attribute Name and the GP Dynamic Content block can get the Term Description.

    For the image – little more work involved

    This plugin will give you an image field for the attributes ( and any taxonomy ):
    https://wordpress.org/plugins/categories-images/

    And you should be able to get that image using the shortcode snippet provided here:

    https://generatepress.com/forums/topic/category-image-in-header-element/#post-1783359

    #2033990
    Paul

    Thankyou David, this has been great help!

    I managed to add the header element, the image and the description to the attribute page.

    This is exactly what I wanted and I’m fine with that for the beginning. I will have a look at pods and maybe find a developer for the future, but for now, this is good!

    Now there is only one thing missing, which is the related posts. I tried adding a loop, but I don’t know how to make it “dynamic” so that it will take the attribute. Is it possible to somehow “tell” the loop-query to get all posts tagged with exactly the same name as the attribute? Then all posts concerning the author could be displayed. It would best to display them below the woo-products but I’m not sure if that is possible.

    #2034362
    Paul

    Hi David,
    just a quick update: Maybe there is another problem, which is that the attribute pages might not be searchable on the website. I tried it with this plugin and also with WP Extended Search but I couldn’t get it to work. Also, I would like the author pages to be indexed by Google and I’m not sure if that’s possible with the attribute archive page?

    So I might settle with the follwing solution:
    Build the author page with woo product by attribute loop and post loops and reusable blocks. In order to only have one page for every author, I will use redirects. This will definately be good for the next time. Meanwhile I can study CPT and implement it when I’m ready. 🙂

    Sorry for troubling you and thanks for your help!

    #2035453
    David
    Staff
    Customer Support

    Yeah i agree that would be a better process for today.

    Glad to be of some help

    #2035493
    Paul

    Thank you again, David. I’ll mark the topic as resolved.

    #2035586
    David
    Staff
    Customer Support
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.