Forums

[resolved] Having trouble using the_title() and the_permalink() in a plugin (2 posts)

  1. Trezy
    Member
    Posted 3 months ago #

    So I'm trying to write a new plugin since I haven't been able to find one that does exactly what I want with the extensibility that I desire. The goal of the plugin is to be able to use a simple shortcode to display an image slider that automatically populates with your blog's latest posts.

    I've got the basic plugin files ready and the shortcode implemented and tested. Now I'm trying to get the plugin to pull in the blog's latest posts but I'm running into a bit of a snafu. When I use the_title() and the_permalink() they display outside of the code I'm trying to contain them in. Further, the_content() is displaying once with the_permalink() and the_title() and then a second time where it's supposed to.

    You can see the behavior here.
    Here's the code I'm using:

    [Code moderated as per the Forum Rules. Please use the pastebin]

  2. Trezy
    Member
    Posted 3 months ago #

    Got an answer on Stack Overflow. Check it out here.

Reply

You must log in to post.

About this Topic