This topic has 10 replies, 3 voices, and was last updated 6 years by Radu.

  • Author
  • #209695
     ocram
    Participant

    Hello, how I can allow to show the content of a shortcode in the title and color this green?
    I need this for the Post and The “Kleo Post” grid from Visual Composer.

    Thanks for awnser ๐Ÿ™‚

    #209698
     Kieran_SQ
    Moderator

    Hi,

    The shortcode question is one of WordPress functionality and not an issue / extension of KLEO. With that said I only know of one plugin that would allow you to render a shortcode in a title but it is two years since it was last updated. If you wish you can try it https://wordpress.org/plugins/jonradio-shortcodes-anywhere-or-everywhere/.

    When you say you would like to colour it green. Are you referring to the whole title or just the shortcode output? If it is the output of the shortcode that you wish to style then you’ll need to either hook into the shortcode you’re using to extend it with HTML before and after or find an alternative plugin to the one mentioned above.

    This would be an advanced task to achieve and if you’re not confident with PHP and/or HTML you’ll need to hire a developer to achieve this custom functionality for you.

    Thanks,

    Kieran

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Custom development requests can be sent to dev@seventhqueen.com,ย one of the development team will be happy to discuss your needs.

    #209701
     ocram
    Participant

    @Kieran_SQ
    I have alredy a Code where i can View the Shortcode in title but its only Work without kleo. I cant view the Output on in the “kleo post” from Visual Composer where i can list Posts and on the Post. I See it only on the hierarchy.

    #209702
     Kieran_SQ
    Moderator

    Hi,

    The title output should be the same if the title function has been manipulated correctly as we’re only calling the post title. I’ll refer this ticket to one of our devs for review but you’ll need to share the following so we can look into it

    – A page using the KLEO Posts element
    – The name of the plugin or location of custom code used to add shortcodes to titles
    – Admin credentials for your site

    Someone will be in touch with you as soon as they can, Monday to Friday, East European Time.

    Thanks,

    Kieran

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Custom development requests can be sent to dev@seventhqueen.com,ย one of the development team will be happy to discuss your needs.

    #209752
     ocram
    Participant

    @Kieran_SQ
    Ok, Thanks. Did I have to write to any e-mail? because this is a public ticket.

    #210004
     Radu
    Moderator

    Hi,

    Not sure if this thing can be from Visual Composer directly, i will do some test and i will come back to you.

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #210005
     ocram
    Participant

    @Radu
    OK, Thaks ๐Ÿ™‚

    #210084
     Radu
    Moderator

    Hi,

    It seems that even using default wp theme the shortcode in title not running at all

    This looks to be related to the VC plugin, you will have to ask their support team.

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #210096
     ocram
    Participant

    QRadu

    I dont user any plugin for this, I use this:

    add_filter( ‘single_post_title’, ‘do_shortcode’ );

    But I see it only in the history…

    Attachments:
    You must be logged in to view attached files.
    #210255
     ocram
    Participant

    Hello, I have found how to work title with shortcodes.

    add_filter( ‘single_post_title’, ‘do_shortcode’ ); //Thisone you need for the hirachy

    if( !is_admin() ) {
    add_filter( ‘the_title’, function( $title ) {
    return do_shortcode($title);
    } );
    } // This one for the title same ๐Ÿ™‚

    Thanks for help ๐Ÿ™‚

    #210303
     Radu
    Moderator

    Great!

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 11 posts - 1 through 11 (of 11 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?