[Resolved] Custom post below header (using dynamic elements)

Home Forums Support [Resolved] Custom post below header (using dynamic elements)

Home Forums Support Custom post below header (using dynamic elements)

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #2226141
    Bob

    Hello,

    I was just introduced to the dynamic elements and really found them useful. I was wondering: Would it be possible to list a custom slug (or page) of info “below the dynamic block header” for the various basins and watersheds (and before the blog posts begin?) On my https://gohdyrology.org site, every basin and watershed has a separate header (which I created universally using a dynamic block element) and then blog post under the custom “Basins” Taxonomy I created for each basin. Between the header and the scroll of blog posts, I would like to feature a sticky into post that includes some basic into info that always stays at the top.

    Examples of basins: https://gohydrology.org/basins/big-cypress/, https://gohydrology.org/basins/everglades/, https://gohydrology.org/basins/okeechobee-2/

    Is there a way to do this using the dynamic elements, or other way?

    Thank you,

    Bob

    #2226337
    David
    Staff
    Customer Support

    Hi there,

    if i understand correctly you want something inserted here:

    2022-05-20_10-29-16

    That correct ?

    And will its content be identical on every archive page ?

    #2226491
    Bob

    yes, that’s correct. The one caveat is that the content will be “unique” for each watershed.

    For example, the Big Cypress Swamp would have its own unique intro post, in the same way that the Everglades would also have its own post, and so on and so forth for all the other basins and watersheds.

    (((Side note: In my brainstorming, I came with the idea of setting up a page (i.e. gohydrology/basins/big-cypress) and then use WP-Show-Posts to list the most recent posts under that. However, using WP-Show-Posts doesn’t see (or rather show) the “teal colored” social share boxes that I’ve embedded in my posts, which I like and thinks makes the posts stand out. I also like the way the main blog engine displays the blog posts, and I think it may be faster too, than using short code – not sure.)))

    In any event, seeing how powerful the dynamic elements and hooks are, I thought to reach out.

    #2226531
    David
    Staff
    Customer Support

    I am not one for recommending plugin that have not been updated for a while, but there is this:

    https://wordpress.org/plugins/category-sticky-post/

    the logic here is you can create a category specific post, and make it Sticky so it will appear at the top of the relevant category archive.

    #2226571
    Bob

    Hey David, I tried the plugin. The problem is: Category-Sticky-Posts only works for categories. It doesn’t see the other taxonomies (i.e. Products, Basins) that I set up. Thus, I really can’t use it for the Basins, which is my goal. What do you think? Do you have any other ideas or suggestions? Thanks! Bob

    #2226699
    David
    Staff
    Customer Support

    hmm thats a shame… what kind of content will be displayed there ? And how many different taxonomy terms will there be ?

    #2226712
    Bob

    Hey David, Primarily I was interested in it for the basins (i.e. watersheds). I wanted the first post to lay out the intro for the basin, and also feature a few updated charts and possibly an audio file. After that first post, all the rest can be chronological. Does that make sense? Is it possible? If it is, it would really improve “discoverability” for my site, as people could go to the basin and easily get dialed in and find all the current data.

    (((P.S. I tried setting up a page and then using WP-Show-Post — However I couldn’t get that nice header that’s on all the archives to manifest itself. I think that was related to me needing to recreate the “parent page” structure for that one page, and the “post archives basin” command on the dynamic element not seeing it. I also found in WPBeginner a post on the topic, but it only present a solution for one additional custom post type, not multiple as I have (https://www.wpbeginner.com/wp-tutorials/how-to-add-sticky-posts-in-custom-post-type-archives/)))

    #2226997
    Bob

    David – More about the Taxonomy terms – Under basins there are about 20 terms (i.e. Big Cypress Swamp, Everglades, Lake Okeechobee, SFWMD, SWFWMD, SJRWMD … the list goes on) and Under Products there are about 10-20 terms (i.e. editorials, trivia, movies, podcast, dictionary, bookshelf, cheatsheets, diagrams … the list goes on).

    I really love how the dynamic block draws the “metadata and image” from the taxonomies. That looks so sleek, and is very functional at informing the reader what the page is all about (e.g. https://gohydrology.org/basins/big-cypress/). What would be the complete homerun is having that top sticky post. On option is to add more in the taxonomy meta page. But I thought having that standalone sticky post would look and function better.

    Thanks again for thinking about this. Your perspectives and ideas really help inform me of what is and is not possible.

    #2227642
    David
    Staff
    Customer Support

    Ok whilst doing some head scratching – stumbled across this plugin:

    https://wordpress.org/plugins/sticky-posts-switch/

    Seems to be like the above for custom posts / taxonomies – does that work ?

    #2227650
    Bob

    Hey David, Thanks for keeping thinking about this. I tried the plugin: The problem is it’s one-dimensional –> It does allow a sticky post (or posts) to be displayed on the archive pages for all my taxonomies (categories, tags, products and basins), but it’s the same sticky post(s). It doesn’t allow me to pick specific “sticky posts” by my separate taxonomies or individual basins. For example, under the Basins taxonomy, I have about 20 unique sub-basins (i.e. watersheds) that ideally I’d like to have a sticky post, or post up at the top, for each one.

    It sounds like there may not be a simple solution.

    Do you see a feasible pathway, whether it be coding or possibly the new version of Generate Blocks? Not sure.

    Thanks again for your help,

    Bob

    #2227744
    David
    Staff
    Customer Support

    The only way that springs to mind without lots of custom work, is to create a unique Block Element for each of the different taxonomy terms and hook that in after the description ( or before the loop … same thing )..

    #2227861
    Bob

    Hey David, Thank you for helping me on this. The More I think about it, I really only need the unique Block Elements for the Basin Taxonomy. Or in other words, for each Basin (e.g. Big Cypress Swamp, Everglades, Lake Okeechobee, Apalachicola River, etc) I would want an opening block with a general intro about each basin. No such Block or hook is required for the other taxonomies (i.e. categories, tags and products).

    That being the case, it sounds like I would need multiple Block Elements (for each basin) but only a single hook (to hang under the Basin Header Block). Does that sound correct, and if so — would it be possible for you to give me a hint on how to set up the hook? I’m a newbie to the elements. But I think this is a really good solution, especially since I’m only targeting the Basin Taxonomy. That’s doable.

    Thanks for all your help!

    Bob

    #2227878
    Bob

    Hey David,

    I figured it out (I think), thanks to your tips.

    Thanks a million for all your help!

    Bob

    #2227879
    Bob

    Here’s my prototype for the one basin. I used elements –> block element –> global hero –> and then hooked it “before_main_content” and then used the display rules: “Post Basin Archive” for “Big Cypress Swamp”.

    https://gohydrology.org/basins/big-cypress/

    Thanks again for all your help!

    Bob

    #2228241
    David
    Staff
    Customer Support

    Awesome – looks great!

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.