Ponty logo

connector

To get ads to a WordPress installation, this plugin - Ponty Connector, is a good choice. It's available here (37KB) and does two things.

  1. Declares two Custom Post Types (pnty_job, pnty_job_showcase)
  2. Receives data from a Ponty system on a dedicated URL

Which means that ads, when they have been sent from a Ponty system to the WordPress installation, are available as native WordPress content.

Using the plugin

The plugin comes with a few shortcodes which can be used to get basic functionality in place. Available attributes to control certain aspects of the shortcodes is documented on the settings page for the plugin. So is the meta data that comes with every ad.

FAQ

I've applied the API key but can't see any ads?
The plugin never fetches anything. It only enables receiving ads. A Ponty system must send ads before anything exists in the WordPress installation.

Common customizations

The most common customization to make ad presentation look good is to create a new file in the template folder with the name single-pnty_job.php. That file is then responsible for the rendering/presentation of a single ad. A most basic example is shown below.

<?php get_header(); ?>
<?php if (have_posts()): while(have_posts()): the_post();?>
    <div class="pnty-job">
        <h1><?php the_title();?></h1>
        <?php the_content();?>
    </div>
<?php endwhile; endif;?>
<?php get_footer(); ?>

Other commen customizations is to write your own methods for the listing of all or a subset of the ads. Below is an example of listing ads that has a specific tag.

<?php
    $jobs = get_posts([
        'post_type' => 'pnty_job',
        'has_password' => false,
        'numberposts' => -1,
        'tax_query' => [[
            'taxonomy' => 'pnty_job_tag',
            'field'    => 'slug',
            'terms'    => 'exampletag'
        ]]
    ]);
?>
<?php if (count($jobs) > 0):?>
    <ul class="exempel">
        <?php foreach($jobs as $job):?>
            <li>
                <a
                   href="<?php echo get_permalink($job->ID);?>"
                   title="Permallink for <?php echo $job->post_title;?>"
                >
                  <?php echo $job->post_title;?>
                </a>
            </li>
        <?php endforeach;?>
    </ul>
<?php else:?>
    <p>No published ads at the moment.</p>
<?php endif;?>

Open application

If you want the plugin to render an application button for open applications the following shortcode can be used.

[pnty_apply_btn
    org="{example_org}"
    color="{hexadecimal color code}"
    assignment_id="{assignment_id from Ponty}"
]

Both example_org and assignment_id is available from within Ponty where example_org is the subdomain the system is running from and assignment_id comes from the chosen assignment.

Changelog

1.0.13

2023-10-27

Support for PHP 8.x. Widget pnty_latest_jobs_widget has been removed due to compatibility issues. Meta data for url to profile image from Ponty can be found in _pnty_user_profile_image if the profile has an uploaded image in Ponty.

1.0.12

2021-09-22

Added location as attribute to pnty_jobs_list and pnty_showcase_list.

1.0.11

2021-02-25

Added two action hooks pnty_action_post_job and pnty_action_delete_job. For further processing should it be necessary.

1.0.10

2019-12-09

The plugin can now receive a video URL that is available with meta key _pnty_video_url.

1.0.9

2019-10-31

The plugin can now receive a password which enable single ads to be protected. The reason is to be able to "preview" an ad. Please be aware that any custom method that fetches ads should have 'has_password' => false.

1.0.8

2019-03-05

The dependency on create_function has been removed for >= PHP 7.2 compatibility.

1.0.7

2018-12-13

Bugfix. The shortcode attribute logo_width was overwritten.

1.0.6

2018-10-03

The meta data _pnty_language is now available.