[Resolved] Sidebar Control and 'A Category'

Home Forums Support [Resolved] Sidebar Control and 'A Category'

Home Forums Support Sidebar Control and 'A Category'

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #806185
    Maike

    Hi Leo,
    Sorry for being unclear. πŸ™‚
    No, I want to keep the title, but hide the meta (categories). Is that possible?
    Thank you,
    Maike

    #806189
    Maike

    Hi Leo. I figured this one out. Thank you!

    #806199
    Leo
    Staff
    Customer Support

    Glad it’s sorted πŸ™‚

    #807182
    Maike

    Hi guys

    I’m still struggling to show the description on the category page.

    I followed this… learned more about elements, add this shortcode to my php file:
    (using dispatch skin, created a child theme)

    add_shortcode( 'term_description', 'tu_term_description' );
    function tu_term_description() {
        ob_start();
        echo term_description( get_queried_object()->term_id, 'category' );
        return ob_get_clean();
    }

    and added this as a new element hook.

    <?php if ( is_category() ) : ?>
        [term_description]
    <?php endif; ?>

    checked off the execute PHP checkbox
    left priority set to 10
    hook: before_maine_content

    display rules: all archives.
    The only thing that shows up is “[term_description]”
    but not the actual description I created for that category.

    Can you please help?

    Thank you,
    Maike

    #807496
    Tom
    Lead Developer
    Lead Developer

    Hey Maike,

    Try this instead:

    <?php if ( is_category() ) :
        echo do_shortcode( '[term_description]' );
    endif; ?>

    Let me know πŸ™‚

    #808195
    Maike

    Hi Tom!!

    that code

    <?php if ( is_category() ) :
    echo do_shortcode( ‘[term_description]’ );
    endif; ?>

    I T W O R K E D!!!

    Nothing short of magical. Thank you, thank you!

    I wish I was proficient enough to address the next few problems myself, but I’m afraid I do have to ask some follow up questions.

    01
    The text for the category description displays just fine. But it’s also displaying the latest post separately from the rest (inline with the end of the category description text).
    Ideally, I’d like to have the category header show, the description show, then some small white space between the end of that text and the beginning of the 3×3 grid
    Follow up.
    The header and text styling would be done with CSS, right? I just don’t know how to ‘call’ those parts (h2, p, …) to customize it.
    The second part is that I don’t want any one post to stand out.

    Here is how the categories display in a category in which I haven’t added any category description text
    i.e. gluten free recipes

    Here is how the category page display in a category in which I have added some category description text
    i.e. Dinners

    In essence, I’d like to display them in the 3×3 grid, not show the latest post separate and have to ability to style the text.

    Thank you,
    Maike

    #808544
    Tom
    Lead Developer
    Lead Developer

    Can you try setting the priority of your hook to 5?

    Let me know πŸ™‚

    #808624
    Maike

    Hi Tom!

    That worked! It’s great! Thank you so much!

    I love this coding magic.

    Thank you,
    Maike

    #808816
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

Viewing 9 posts - 16 through 24 (of 24 total)
  • You must be logged in to reply to this topic.