How to get the post title in the new Genesis Themes

Community Forums Forums Design Tips and Tricks How to get the post title in the new Genesis Themes

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  pluzito 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #91807

    pluzito
    Participant
    Post count: 12

    Hello everybody, thanks for your help, I’m back at the forums with this issue. Now I’m using the new version of Magazine Theme (at http://RobertoRamasso.com), but I can’t get the old query <?php the_title(); ?> to work. What I need is to show a box to my visitors with something like this:

    “Thank you for reading <?php the_title(); ?>. If you enjoy it, please share it!”

    I could do this from the functions.php with a code like this:

    add_action( ‘genesis_entry_footer’, ‘my_custom_content’, 6 );
    function my_custom_content() {

    echo ‘<p>”Thank you for reading <?php the_title(); ?>. If you enjoy it, please share it!”</p>';

    }

    But what I couldn’t get working is the function to display the post title. Is there any new hoook or function to replace this one <?php the_title(); ?> ?

    Thanks in advance for your help, and have a nice weekend!

    http://RobertoRamasso.com
    #91889

    braddalton
    Participant
    Post count: 10587
    #92201

    pluzito
    Participant
    Post count: 12

    Hi Brad, and thanks a lot for your help. I read the info in that link and I could show de Post Title, but not within the text I need to show. And the post title appears in H1 instead in <p> like I need it.

    I have this function in my functions.php

    add_action( ‘genesis_entry_footer’, ‘my_custom_content’, 6 );
    function my_custom_content() {

    echo ‘<p>”Thank you for reading [HERE IS WHERE I NEED TO GET THE POST TITLE]. If you enjoy it, please share it!”</p>’;

    }

    In the Non Genesis retro Studiopress themes I get that working using this string: <?php the_title(); ?>
    I tried putting this:

    add_action( ‘genesis_entry_footer’, ‘my_custom_content’, 6 );
    function my_custom_content() {

    echo ‘<p>”Thank you for reading <?php the_title(); ?>. If you enjoy it, please share it!”</p>’;

    }

    But didn’t work. Then I tried:

    add_action( ‘genesis_entry_footer’, ‘my_custom_content’, 6 );
    function my_custom_content() {

    echo ‘<p>”Thank you for reading add_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ );. If you enjoy it, please share it!”</p>’;

    }

    Didn’t work neither and gave a blank screen. So I tried:

    add_action( ‘genesis_entry_footer’, ‘my_custom_content’, 6 );
    function my_custom_content() {

    echo ‘<p>”Thank you for reading echo the_title();. If you enjoy it, please share it!”</p>’;

    }

    Which hook or code I need to add to my functions to get it working? I just need to get the post title with a call, it’s everything I need. Please help me, I’m starting feeling like a dummy and frustrating :(

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.