Category Archives: Skrypty

OpenAI Coupons Desc for AppThemes Clipper

Plugin is preparing a new unique descriptions for coupons using AI, based on coupon title, current description, tags, category and store name.

If you are using affiliate networks to populate your website with coupons, you probably noticed that most of the coupon descriptions isn’t engaging, nicely looking, and they are not unique.

So here it comes, a Open AI Coupons Desc plugin that will help you to describe hundreds/thousands coupons imported from affiliate networks!

Features

  • Test various prompts for generating description by AI from settings page
  • Define number of coupons to describe (during one routine)
  • Define max number of tokens used to prepare description by AI
  • Define description prompt for the AI
  • Choose if description also should be created from tags, stores and categories names
  • Sends notifications about described coupons
  • Describe coupons on demand or schedule hourly, twice daily or daily updates
  • Test API connection from settings page

Requirements

  • Plugin requires Clipper 1.4 or newer.
  • Plugin requires OpenAI account, API key, and some credit balance available.

Visit Marketplace: https://marketplace.appthemes.com/plugins/openai-coupons-desc/

[WP Plugin] AppAd Manager

Strona wtyczki na WordPress.org: AppAd Manager
Strona projektu na GitHub: https://github.com/meloniq/appad-manager

Czym jest wtyczka AppAd Manager?

Wtyczka do wstawiania reklam pomiędzy wpisy w szablonach AppThemes t.j. Clipper, ClassiPress, JobRoller.

Widok reklamy w Clipper’ze

Download:
AppAd Manager

DEV:
Development Log
Subversion Repository

[WP Plugin] WP-Orphanage Extended

Strona wtyczki na WordPress.org: WP-Orphanage Extended
Strona projektu na GitHub: https://github.com/meloniq/wp-orphanage-extended

Czym jest wtyczka WP-Orphanage Extended?

Wtyczka do promowania użytkowników bez określonej roli (sieroty), do roli z innych blogów w których się rejestrowali, lub domyślnej jeśli nie znaleziono.

Strona konfiguracji w panelu administracyjnym

Download:
WP-Orphanage Extended

DEV:
Development Log
Subversion Repository

[WordPress] Get pagination to work on author page (author.php)

Important

This post is not about adding WP-PageNavi plugin, but how to get it to work on author page.

Let say that we use in our WordPress 2 post types, one ‘post’ to write posts, and second ‘articles’ to write some articles…

Now, on author page we wanna list all posts and articles written author, show them in separate sections, and display cute pagination under sections to don’t load hundrets entries on one page.

We will query them using query_posts, as follow:

$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
 
// Query articles of author
query_posts( array( 'post_type' => 'articles', 'post_status' => 'publish', 'author' => $curauth->ID, 'paged' => $paged ) );
// ... some code to loop and print
 
// Query posts of author
query_posts( array( 'post_type' => 'post', 'post_status' => 'publish', 'author' => $curauth->ID, 'paged' => $paged ) );
// ... some code to loop and print

And everything should work fine until quantity of posts is bigger then articles, I mean pagination will work fine…

But if author will have for example written 5 posts and 15 articles, and we will try to get on page no. 2 – will see unfriendly 404 page!

Why?!

Because author main query is just for posts, and parameter max_num_pages does not allow second page – so we need to extend author main query with ‘articles’ post type.

Add new function to your “functions.php” template file, and assign to action pre_get_posts

function custom_author_archive( &$query ) {
    if ($query->is_author)
        $query->set( 'post_type', array( 'post', 'articles' ) );
}
add_action( 'pre_get_posts', 'custom_author_archive' );

Now, if we will enter to author page, will see strange thing, pagination working fine but both loops, display both ‘post’ and ‘articles’… it happen like this because our added action override parametres in query_posts call.

So, if author main query allow us to get on page number 2, we dont need this action anymore to modify other queries too…

To do this add in top of “author.php” template file instruction to remove this action from any other calls:

remove_action('pre_get_posts', 'custom_author_archive');

Refresh your author page, and enjoy WORKING pagination!