Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #82731
    radeko
    Participant

    Hi on my testing site I would like to add a string/variable to each post title
    http://54.83.45.133/category/recorded-speech-or-media-event/puja/holi/

    for example
    Holi Tour, some text

    I tried to add a string above this line:
    get_template_part( 'content', get_post_format() );

    file archive.php, line ~90)
    but the string appears above the title

    thank you
    Radek

    #82735
    Mahesh
    Participant

    Hi @radeko,

    The correct file to make the changes for the above issue is content.php not archive.php. I prefer you to create child theme and make change in child theme because you’ll lose all your changes after theme updates. Create a child theme first, check this LINK for more details on create child theme.
    Then copy content.php from Catch Responsive theme to the child theme. Open child theme’s content.php and modify line 25 (below line):
    <h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    to look like the code below
    <h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?> Your String Here</a></h1>
    Note: Please replace “Your String Here” in the above code with you desired string.

    Regards,
    Mahesh

    #82740
    radeko
    Participant

    thank you, your suggestions work (as always)

    best regards
    Radek

    #82784
    Mahesh
    Participant

    Hi @radeko

    Thank you for your appreciation.

    Regards,
    Mahesh

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘adding a string to a post title in the archive’ is closed to new replies.