• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Can you add short codes to blog posts?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Can you add short codes to blog posts?

This topic is: not resolved

Tagged: blog post, short code, shortcode

  • This topic has 4 replies, 3 voices, and was last updated 12 years, 3 months ago by Carla the Moose.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • April 7, 2013 at 4:05 pm #33799
    Carla the Moose
    Member

    I'd like to add a symbol at the end of each post. It will appear on the same line as the last word and the ending punctuation.  *

    Just like the asterisk above.

    Instead of using span class to style it and adding the link, it would be awesome if I could create a shortcut. Can I make my own short code and use it in my blog post?

    Thanks!

    April 7, 2013 at 4:16 pm #33801
    Nick Davis
    Member

    Hi - yes, you can make your own custom shortcodes in WordPress, more info here:

    http://codex.wordpress.org/Shortcode_API

    If you know you're always going to put it at the end of EVERY post though you might be best adding it automatically at the end of every post via your theme. (For example you could create a function (placed in your functions.php file or your single.php template file) that would automatically add your asterisk at the end of every blog post).


    @iamnickdavis. I share the best new Genesis stuff weekly at GenesisWP.guide
    I also offer Genesis theme setup and Photoshop (PSD) to Genesis conversions

    April 7, 2013 at 4:22 pm #33802
    Carla the Moose
    Member

    That's a great idea. I'll create a function for this instead of a short code.

    I'd prefer to add it to my functions file, but I haven't done this before. Do you know of any helpful instructions on how to do this? I thought I saw a tutorial on StudioPress, but I can't find it.

    Thank you.

    April 7, 2013 at 5:56 pm #33816
    marybaum
    Participant

    This would get an asterisk on the line after every post - I think.

    Add filter ('genesis_after_post', 'genesis_add_sigchar');
    function genesis_add_sigchar () {
    echo "*";
    }

    People want me to start dinner, or I'd mess with it some more - what you probably want is something that removes the last , adds the asterisk and then puts back the .

    So instead of just the echo statement, delete and then echo.

    I called this a filter, but maybe it's an action - I'm not too clear on the difference.

    Hope this helps, or gives someone with better php something to correct.

    MB


    Sharing the good news about the wonders of modern CSS and the split-step. Either one should get you moving fast. 😀

    April 7, 2013 at 8:08 pm #33849
    Carla the Moose
    Member

    Thanks, Mary!

    I don't think this will put the symbol at the end of the last sentence in my posts. But I'll play around with the code and see if I can figure this out. There are examples of functions that place signature lines at the end of a post, but I need this to appear directly in the post itself.

    🙂

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble