[Support request] entry-title

Home Forums Support [Support request] entry-title

Home Forums Support entry-title

  • This topic has 1 reply, 2 voices, and was last updated 2 years ago by David.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2189486
    Den

    Hii Team,

    Can you help me out with the entry-title?

    I want to relocate the entry-title of posts. Means, the function should fetch the entry-title and display to the place where I’ve pasted the shortcode.

    Is it possible? If yes, can you guys provide me the function.php code or whatever which can be useful.

    EXAMPLE: https://www.linkpicture.com/q/screenshot-1_48.png

    Thanks

    #2189564
    David
    Staff
    Customer Support

    Hi there,

    you can add this PHP Snippet to create a shortcode that will return the title:

    add_shortcode('db-post-title',function(){
        return get_the_title();
    });

    Then add the [db-post-title] shortcode in whatever markup you need.

    OR Alternatively you can use a Block Element to output all kinds of dynamic content including the title. For example:

    https://docs.generatepress.com/article/block-element-page-hero/

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