• Resolved Ergodyne

    (@ergodyne)


    Hi, I’d like to use this awesome plugin to just list the titles of my posts and have those titles link to the post. I see this code around line 1101

    $tile = str_replace( '[title]', '<h1>' . esc_html( $post->post_title ) . '</h1>', $tile );

    Can this be changed to have the title be a link to the post?

    Thanks

    https://wordpress.org/plugins/latest-post-shortcode/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Iulia Cazan

    (@iulia-cazan)

    Hi,

    Normally I would advice against the change of code of the plugin. However, if you know what you are doing, then it might be easier to change the tile pattern instead of changing the line you are asking.

    Look at how the full pattern looks at line 72 for example, and move [a] and [/a] where you need the link to be. The code, if you did not alter it, should do the rest for you.

    Let me know how it went.

    Thread Starter Ergodyne

    (@ergodyne)

    Hi, Thank you so much! That was much easier then editing the other part of the code and something easy to remember when I update. It worked perfect! Had to change a few CSS lines, but those are in a custom place so I didn’t need to edit the plugin CSS.
    Again, thank you, this worked great for what I needed and there’s no other plugin out there like this! Great work!

    Plugin Author Iulia Cazan

    (@iulia-cazan)

    Great! I’m glad that it worked and that it is useful to you too.
    Please don’t forget to rate it!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Link Titles Only’ is closed to new replies.