an addon that puts names and logos from partners to a widget – a special addon
-
cc
What Features Should Every WordPress Job Board Plugin Have?
The feature list varies from one job board website to another, depending on the added and desired functionality. There are so-called general features. For instance, a job board isn’t one without job listings, application forms, and user profiles.we have the awesome collection of snippets for the wp-job-manager: here https://wpjobmanager.com/customization-snippets/
On the other hand, there are project-specific features we might want to have. These so called project-based features – can be for an example a Favorites page for our applicants or the candidates to save the jobs they like, or on the other handside – a form submissions manager for website admins to monitor applications, and many other things more. here i have listed some ideas of cool features every WordPress job board site should have:
Custom Post Types and custom fields functionality to be able to add job listings;
A quick search and a filtering system to find the best job;
Application management feature,
Centralized email sending option to notify the website usersadditonally – i am musing about the development of an add-ons; here i have written down some ideas – some ideas how to achieve the desired functionality.
what is aimed: an addon that puts names and logos from partners to a widget. I want to have an option that allows me to put partner-logos onto my website that runs wp-jobmanager and the jobify-theme.
It would be nice if this fits in a widget.well – to display partner-logos on the website that runs the WP Job Manager, we can create a custom widget that displays the logos. Here are the steps that might be useful:
first we have to create a custom post type for the partners by adding the following code to our functions.php file:
function create_partner_post_type() { register_post_type( 'partner', array( 'labels' => array( 'name' => __( 'Partners' ), 'singular_name' => __( 'Partner' ) ), 'public' => true, 'has_archive' => true, 'menu_icon' => 'dashicons-heart', ) ); } add_action( 'init', 'create_partner_post_type' );
well this code will create a new post type called ‘partner’ with a heart icon in the WordPress admin menu.
now we add custom fields for the partner logo and website URL by installing and activating the Advanced Custom Fields plugin.
and afterwards we create a new field group and add a field for the partner logo and another field for the website URL.then we reate a custom widget that displays the partner logos by adding the following code to your functions.php file:
class Partner_Widget extends WP_Widget { function __construct() { parent::__construct( 'partner_widget', __( 'Partner Logos', 'text_domain' ), array( 'description' => __( 'Display partner logos', 'text_domain' ), ) ); } public function widget( $args, $instance ) { $partners = get_posts( array( 'post_type' => 'partner', 'posts_per_page' => -1, ) ); echo $args['before_widget']; if ( ! empty( $instance['title'] ) ) { echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title']; } echo '<div class="partner-logos">'; foreach ( $partners as $partner ) { $logo = get_field( 'partner_logo', $partner->ID ); $url = get_field( 'partner_url', $partner->ID ); if ( $logo ) { echo '<a href="' . $url . '"><img src="' . $logo['url'] . '" alt="' . $logo['alt'] . '"></a>'; } } echo '</div>'; echo $args['after_widget']; } public function form( $instance ) { $title = ! empty( $instance['title'] ) ? $instance['title'] : __( 'Partners', 'text_domain' ); ?> <p> <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>"> </p> <?php } public function update( $new_instance, $old_instance ) { $instance = array(); $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? sanitize_text_field( $new_instance['title'] ) : ''; return $instance; } } function register_partner_widget() { register_widget(
well finally – here are the ideas for the widget that displays partner logos of our wp-jobmanager site
what do you say !? Do we need more features – should we re-work the code somewhere somehow!?
look forward to hear from you – plz share your ideas, inisights and critics.thank yoou alot
- The topic ‘an addon that puts names and logos from partners to a widget – a special addon’ is closed to new replies.