Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you are using the theme Twenty Fifteen then that tells me you have the latest WordPress – which means that your WordPress install will contain different type of content pages where you could insert <?php cc_featured_image_caption(); ?>.

    If you want to minimize the number of plugins WordPress is using, while taking advantage of this plugin – at least while the developer takes care of this automatically in a future update – you will need to make use of child themes.
    If you have never created a child theme, there is a plugin that lets you create one based on your current theme. You then switch to your child theme and you are free to uninstall that plugin.
    From there, I recommend reading up on functions.php and how to filter content so you can add <?php cc_featured_image_caption(); ?> dynamically.
    If you don’t care too much about that, then you can simply modify your child theme – look for php files that start with content in wp-content > themes > your child theme.
    If you open any of those content files, the first few lines, which are comments, will tell you what they do. So essentially, it all depends where you want your <?php cc_featured_image_caption(); ?> to be displayed.
    Good luck, and have fun learning more about the inner workings of WordPress.

    I noticed op did not reply but for those interested, you do not even need to place the code on your theme.
    I do not like advertising other plugins, but this two go together like peanut butter and jelly, or cookies and cream or bacon cheeseburger with peanut butter (if you are from that cult).

    Anyways, plugin: Post Snippets by Johan Steen.

    Once you have said plugin, got to its settings page, “Add New Snippet”, set a title for it (no spaces), check to enable Shortcode and PHP Code and add something like this on the Snippet window (modify as needed to fit your needs):

    echo "<p><i>Featured Image Credit: </i></p>"; cc_featured_image_caption(); echo "<hr />";

    This will create a snippet that can be inserted onto your posts right from the editor with the featured image caption included.

Viewing 2 replies - 1 through 2 (of 2 total)