Ok, looking through the source for the plugin, I see it does actually have an ‘include_content’ parameter that uses get_the_content()… I’m sure I did try that option in the shortcode and it didn’t work for me. I’ll check this again just now.
For the title link, I’ve modified the plugin code as mentioned below.
New entry in the $atts array:
'title_link' => true,
Then this in the next section:
$title_link = (bool)$atts['title_link'];
And lastly, I wrapped the loop’s title output in an if() statement:
if ( $title_link ) {
$title = '<a href="' . get_permalink() . '">' . get_the_title() . '</a>';
} else {
$title = '<span class="title">' . get_the_title() . '</span>';
}
Bill, unfortunately I haven’t fixed my test WP install on my webserver and I’m not near my main dev machine at the moment, so before I go install this on a client’s website… This won’t break anything in your plugin, will it? I only had time to skim through the code, I haven’t been able to read through all functions thoroughly yet.
Ok, weird.. I decided to try edit the plugin file through the WP editor directly, I altered it slightly to rather use ‘post_title_link’ instead of ‘title_link’, and the output loop has this instead:
if ( $post_title_link == false ) {
$title = '<span class="title">' . get_the_title() . '</span>';
} elseif ( $post_title_link == true ) {
$title = '<a class="title" href="' . get_permalink() . '">' . get_the_title() . '</a>';
}
It hasn’t broken anything, but it also hasn’t changed anything either.. Am I missing something here?
Ok, back again.. Last post for now, promise. 🙂 I got it working, but not the way I would like it to.
I have no idea why, but setting the default value for ‘post_title_link’ to false and then setting it to true in the shortcode works. Problem with this is that any time my modified shortcode is used, unless the user explicitly sets post_title_link=”true”, it will not create a link.
I can work with this for now, but I’m still open to any other suggestions.
I don’t recommend making any changes to the plugin itself since they will be overwritten when the plugin is updated.
You should use an output filter to modify the post’s output. You can pass your own attributes to the shortcode and see if that has a value before actually modifying it.
Hope that helps (sorry for the delay, I only check these forums every so often)