Posts Tagged ‘Parameters’

Get Image from Post, a Free WordPress Plugin

As with many of my free WordPress plugins here on the website this one is used extensively throughout my website to help me deliver a great site for my visitors. The plug basically allows users to grab an image from their posts and display it in the Loop.

It’s perfect for home pages, archives etc. where you link to include a visual idea of what the posts about.

This is a simple plugin which allows users to return an image from the related post.

Please feel free to download this plugin.

Installation

To install the plugin, please upload the folder to your plugins folder and active the plugin.

== Frequently Asked Questions ==

= How do I display the results? =

Insert the following code into your WordPress theme files: 

= General results =

ithout passing any parameters, the plugin will return ten results or fewer depending on how many posts you have.

 get_image_from_post();

= Altering the before and after values =

By default the plugin wraps your code in list item (<li>) tags but you can specify how to format the results using the following code:

 get_image_from_post(‘before=<p>&after=</p>’);

= Adding a Link = 

If you’d like to link to the post (remember it’s not live yet) you can do so by calling:

 get_image_from_post(‘link=true’);

= Echo vs. Return =

Finally, if you’d like to copy the results into a variable you can return the results as follows:

 get_image_from_post(’show=false’);

Get Better Excerpt Plugin for WordPress

The Get Better Excerpt plugin works almost identical to the built in get_the_excerpt() and the_excerpt() functions except it returns whole words instead of cutting off the excerpt as the existing function does.

The plugin allows you to display the excerpt or read it to a variable, select the number of words to return and choose if you want the plugin to skip the built in excerpt and read from the content instead.

As with all my plugins, this is the code I use here on this is my url to return excerpts throughout the website. You’re free to download it.

Frequently Asked Questions

= How do I display the results? =
Insert the following code into your WordPress theme files: 
= General results =
ithout passing any parameters, the plugin will return ten results or fewer depending on how many posts you have.
 get_better_excerpt();
= Altering the before and after values =
By default the plugin wraps your code in list item (<li>) tags but you can specify how to format the results using the following code:
 get_better_excerpt(‘before=<p>&after=</p>’);
= Adding a Link = 
If you’d like to link to the post (remember it’s not live yet) you can do so by calling:
 get_better_excerpt(‘link=true’); 
= How many words? = 
You can specify the number of words returned using the option:
 get_better_excerpt(‘words=20′); 
 
 = Skip the excerpt? = 
If you would like to load the content directly, skipping the entered excerpt:
 get_better_excerpt(’skipexcerpt=true’); 
 = Include a trailing character? = 
By default the plugin includes a … after the excerpt, you can remove it or change it by altering:
 get_better_excerpt(‘trail=’); 
= Echo vs. Return =
Finally, if you’d like to copy the results into a variable you can return the results as follows:
 get_better_excerpt(’show=false’); 

 

Easy Scheduled Posts for WordPress

While I was working on my new theme for thisismyurl.com I came across the need to publish a series of scheduled posts in the side bar and so I put together a simple plugin for WordPress. The tool works like most WordPress theme calls and features:

  • Customizable number of links returned
  • Customizable before and after to ensure you can display the results
  • The ability to echo or return results

To use the plugin, install it to your WordPress website and edit your theme files by placing the following code:

General results
Without passing any parameters, the plugin will return ten results or fewer depending on how many posts you have.

[source lang="php"]<?php scheduledPosts();?>[/source]

Specific number of results
If you would like to return a specific number of results as your maximum:

[source lang="php"]<?php scheduledPosts(‘count=10′);?>[/source]

Altering the before and after values
By default the plugin wraps your code in list item (<li></li>) tags but you can specify how to format the results using the following code:

  • [source lang="php"]&lt;?php scheduledPosts(‘before=&lt;p&gt;&amp;amp;after=&lt;/p&gt;’);?&gt;[/source]

    Echo vs. Return
    Finally, if you’d like to copy the results into a variable you can return the results as follows:

    [source lang="php"]&lt;?php scheduledPosts(‘echo=false’);?&gt; [/source]

    Download the plugin

     

    Support forums are now online! If you have any questions, please visit http://forums.thisismyurl.com.

  • Easy Popular Posts Plugin for WordPress

    While I was working on my new theme for thisismyurl.com I came across the need to publish a series of popular posts in the side bar and so I put together a simple plugin for WordPress. The tool works like most WordPress theme calls and features:

    • Customizable number of links returned
    • Customizable before and after to ensure you can display the results
    • The ability to echo or return results
    • Let’s you control how popular a post should be

    To use the plugin, install it to your WordPress website and edit your theme files by placing the following code:

    General results
    Without passing any parameters, the plugin will return ten results or fewer depending on how many posts you have.

    [source lang="php"]&amp;lt;?php popularPosts();?&amp;gt;[/source]

    Specific number of results
    If you would like to return a specific number of results as your maximum:

    [source lang="php"]&amp;lt;?php popularPosts(‘count=10′);?&amp;gt;[/source]

    Altering the before and after values
    By default the plugin wraps your code in list item (

  • ) tags but you can specify how to format the results using the following code:
    [source lang="php"]&amp;lt;?php popularPosts(‘before=&amp;lt;p&amp;gt;&amp;amp;amp;after=&amp;lt;/p&amp;gt;’);?&amp;gt;[/source]

    Echo vs. Return
    Finally, if you’d like to copy the results into a variable you can return the results as follows:

    [source lang="php"]&amp;lt;?php popularPosts(‘echo=false’);?&amp;gt; [/source]

    Minimum Comments
    To ensure you only return truly popular articles, you can limit the returned posts to posts with a minimum number of comments

    [source lang="php"]&amp;lt;?php popularPosts(‘comments=10′);?&amp;gt; [/source]

    Download the plugin

    Support forums are now online! If you have any questions, please visit http://forums.thisismyurl.com.

  • Easy Random Posts Plugin for WordPress

    While I was working on my new theme for thisismyurl.com I came across the need to publish a series of random posts in the side bar and so I put together a simple post randomizer for WordPress. The tool works like most WordPress theme calls and features:

    • Customizable number of links returned
    • Customizable before and after to ensure you can display the results
    • The ability to echo or return results

    To use the plugin, install it to your WordPress website and edit your theme files by placing the following code:

    General results
    Without passing any parameters, the plugin will return ten results or fewer depending on how many posts you have.

    [source lang="php"]&lt;?php randomPosts();?&gt;[/source]

    Specific number of results
    If you would like to return a specific number of results as your maximum:

    [source lang="php"]&lt;?php randomPosts(‘count=10′);?&gt;[/source]

    Altering the before and after values
    By default the plugin wraps your code in list item (<li>) tags but you can specify how to format the results using the following code:
    [source lang="php"]&lt;?php randomPosts(‘before=&lt;p&gt;&amp;after=&lt;/p&gt;’);?&gt;[/source]

    Echo vs. Return
    Finally, if you’d like to copy the results into a variable you can return the results as follows:

    [source lang="php"]&lt;?php randomPosts(‘echo=false’);?&gt; [/source]

    Download

    Download the plugin.

    Support forums are now online! If you have any questions, please visit http://forums.thisismyurl.com.