Add Filter to Allow Shortcodes in Category Description

Community Forums Forums Design Tips and Tricks Add Filter to Allow Shortcodes in Category Description

This topic is: not resolved

This topic contains 6 replies, has 5 voices, and was last updated by  braddalton 9 months, 3 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #13844

    Justin Romack
    Participant
    Post count: 4

    So, I’ve asked this question here before, but wasn’t able to get enough answers to piece together a solution. I figured I’d ask again and see what happens…

    I’m trying to embed a Gravity Form within the category description section, but something is stripping my shortcode and all I see is the text. I’ve seen something like this before…

    add_function( ‘widget_text’, ‘do_shortcode’);

    But I’m just not sure what I’d need to change to get this up and running for my instance. Apologies for my absolute ignorance here – just a “copy guy” working to get some conversion vehicles solid for a client. Any help is greatly appreciated! :)

    Page in question is at: http://blog.drroyalbenson.com/breast-augmentation

    Thanks again, all!

    #14615

    cdils
    Participant
    Post count: 421

    Have you tried using the category “archive intro text” instead of the category description? Not sure if it parses text out the same way or not. Just a shot in the dark. :)


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. :)

    I host a weekly Genesis-focused podcast called Genesis Office Hours. I tweet @cdils.

    #14624

    Justin Romack
    Participant
    Post count: 4

    Thanks so much for the response…

    I misspoke, however, as I’ve been trying to use the shortcode within the “archive intro text” area.

    I may have to repost with an accurate title. I’ve been botching that since I started asking for help here…maybe that’s been the problem all along. :)

    Thanks for the suggestion – and the help getting me on track with the right terminology!

    #14768

    cdils
    Participant
    Post count: 421

    No problem! I was thinking you could do HTML in there, but not sure about PHP – maybe a security issue? Sorry I’m not much help!


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. :)

    I host a weekly Genesis-focused podcast called Genesis Office Hours. I tweet @cdils.

    #57881

    gerardoritchey
    Participant
    Post count: 9

    You can’t use shortcodes. At least not that I see how.

    Genesis does not use the built-in category description to output stuff at the top of the category archive.

    Genesis uses the Archive Headline and Archive Intro Text in Category Archive settings to display information at the top of a category archive.

    It’s sad, because the built-in category description has filters that will allow you to drop shortcodes in there.`add_filter( 'category_description', 'do_shortcode' );
    `

    If you want to use short codes, you’re going to have to unhook how the genesis framework does it, and implement it yourself.

    This thread should get you pointed in the right direction

    #72840

    totalmarc
    Member
    Post count: 1

    this should work:

    add_filter( ‘genesis_term_intro_text_output’, ‘do_shortcode’ );

    #72928

    braddalton
    Participant
    Post count: 9413
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.