The legacy teachPress plugin still ships with jQuery UI, deep shortcode nesting, and a database schema that forces authors to wrestle with formatting quirks and Altmetrics conflicts. Modern WordPress sites demand a lean, block‑first approach that respects the Gutenberg editor, native REST endpoints, and zero‑jQuery footprints. This guide shows how to build a teachpress alternative wordpress modern from the ground up, using PHP 8.2, native blocks, and a tiny JavaScript bundle that scales on WP 6.5+.
Table of Contents
- Why legacy teachPress fails
- Architectural goals for a modern alternative
- Data model & custom post types
- Rendering pipeline
- Minimal JavaScript footprint
- CSS custom properties for styling
- Full plugin scaffold (PHP)
- Technical comparison tables
- Pricing & feature matrix
- Troubleshooting & verification
- Deploying with Kinetix Core + Scholar & SEO Pro
- Next steps & further reading
Why legacy teachPress fails
Legacy teachPress relies on jQuery UI for every modal, tooltip, and drag‑drop interaction. The plugin registers dozens of shortcodes that parse content on the fly, which inflates page load time and creates hard‑to‑debug HTML output. Because the shortcodes run during the_content filter, they bypass the block editor, leading to mismatched markup when Gutenberg rewrites the post. Altmetrics integrations are hard‑coded, causing conflicts with newer citation plugins that expect schema.org JSON‑LD. The result is a maintenance nightmare for academic sites that need reliable citation formatting and fast page speeds.
Architectural goals for a modern alternative
A teachpress alternative wordpress modern must satisfy the following:
- Block‑first UI – All authoring happens inside Gutenberg; no shortcodes.
- Zero‑jQuery runtime – Only native JavaScript, loaded on demand.
- Typed PHP –
declare(strict_types=1);and proper capability checks. - REST‑ready endpoints – Provide JSON for external tools (Google Scholar, Altmetrics).
- Extensible CSS – Use CSS custom properties prefixed with
--kinetix-for easy theming. - Secure nonce handling – All AJAX actions protected with
wp_create_nonce().
These goals align directly with the Kinetix Core + Scholar & SEO Pro stack, which supplies a pre‑configured REST layer and schema.org support out of the box.
Data model & custom post types
The modern replacement stores each publication as a custom post type kp_publication. Meta fields hold DOI, authors, journal, and citation style. Taxonomies kp_subject and kp_year enable faceted navigation.
<?php
declare(strict_types=1);
defined( 'ABSPATH' ) || exit;
function kp_register_cpt() {
$args = [
'label' => __( 'Publication', 'kp' ),
'public' => true,
'show_in_rest' => true,
'supports' => [ 'title', 'editor', 'custom-fields' ],
'rest_base' => 'publications',
'capability_type' => 'post',
'map_meta_cap' => true,
];
register_post_type( 'kp_publication', $args );
}
add_action( 'init', 'kp_register_cpt' );
function kp_register_taxonomies() {
register_taxonomy(
'kp_subject',
'kp_publication',
[
'label' => __( 'Subject', 'kp' ),
'hierarchical' => true,
'show_in_rest' => true,
]
);
register_taxonomy(
'kp_year',
'kp_publication',
[
'label' => __( 'Year', 'kp' ),
'hierarchical' => false,
'show_in_rest' => true,
]
);
}
add_action( 'init', 'kp_register_taxonomies' );
?>
The CPT registration uses show_in_rest so the Kinetix Scholar module can pull publications directly for Google Scholar meta tags.
Rendering pipeline
The block renders the publication list on the front end. Data flows from the database → REST endpoint → block attribute → server‑side render → final HTML.
flowchart TD
A[WP_Query] --> B[REST Controller]
B --> C[Block Attributes]
C --> D[Server‑Side Render]
D --> E[HTML Output]
style A fill:#f9f,stroke:#333,stroke-width:2px
style E fill:#bbf,stroke:#333,stroke-width:2px
Server‑side render callback
<?php
function kp_render_publication_block( array $attributes ): string {
$args = [
'post_type' => 'kp_publication',
'posts_per_page' => $attributes['postsPerPage'] ?? 10,
'tax_query' => [],
];
if ( ! empty( $attributes['subject'] ) ) {
$args['tax_query'][] = [
'taxonomy' => 'kp_subject',
'field' => 'slug',
'terms' => sanitize_text_field( $attributes['subject'] ),
];
}
$query = new WP_Query( $args );
if ( ! $query->have_posts() ) {
return '<p>' . esc_html__( 'No publications found.', 'kp' ) . '</p>';
}
ob_start();
?>
<ul class="kp-publication-list">
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<li class="kp-publication-item">
<h3 class="kp-title"><?php the_title(); ?></h3>
<div class="kp-meta">
<?php echo esc_html( get_post_meta( get_the_ID(), 'kp_authors', true ) ); ?>
</div>
<div class="kp-abstract"><?php the_excerpt(); ?></div>
</li>
<?php endwhile; wp_reset_postdata(); ?>
</ul>
<?php
return ob_get_clean();
}
?>
The block definition (registered in init) points render_callback to kp_render_publication_block.
Minimal JavaScript footprint
All interactive features—filter dropdowns, modal citation previews—are built with vanilla ES6 modules. The script is enqueued only when the block appears on the page.
<?php
function kp_enqueue_block_assets(): void {
if ( ! is_singular() ) {
return;
}
wp_register_script(
'kp-publication-block',
plugins_url( 'build/publication-block.js', __FILE__ ),
[],
filemtime( plugin_dir_path( __FILE__ ) . 'build/publication-block.js' ),
true
);
wp_enqueue_script( 'kp-publication-block' );
}
add_action( 'wp_enqueue_scripts', 'kp_enqueue_block_assets' );
?>
build/publication-block.js (ES6):
document.addEventListener('DOMContentLoaded', () => {
const filter = document.querySelector('#kp-filter-subject');
if (!filter) return;
filter.addEventListener('change', async (e) => {
const subject = encodeURIComponent(e.target.value);
const resp = await fetch(`${wpApiSettings.root}kp/v1/publications?subject=${subject}`, {
headers: { 'X-WP-Nonce': wpApiSettings.nonce }
});
const data = await resp.json();
const list = document.querySelector('.kp-publication-list');
list.innerHTML = data.map(item => `
<li class="kp-publication-item">
<h3 class="kp-title">${item.title.rendered}</h3>
<div class="kp-meta">${item.meta.authors}</div>
<div class="kp-abstract">${item.excerpt.rendered}</div>
</li>
`).join('');
});
});
No jQuery is loaded; the script relies on the native fetch API and wpApiSettings injected by WordPress.
CSS custom properties for styling
The block uses a small set of variables that can be overridden by themes.
:root {
--kinetix-primary: #2c3e50;
--kinetix-accent: #e74c3c;
--kinetix-bg: #f9f9f9;
--kinetix-gap: 1rem;
}
.kp-publication-list {
display: grid;
gap: var(--kinetix-gap);
background: var(--kinetix-bg);
padding: var(--kinetix-gap);
}
.kp-publication-item {
border-left: 4px solid var(--kinetix-primary);
padding-left: var(--kinetix-gap);
}
.kp-title {
color: var(--kinetix-primary);
margin: 0;
}
Themes can simply redefine --kinetix-primary to match their palette without touching the plugin code.
Full plugin scaffold (PHP)
Below is a minimal, production‑ready plugin file that ties together CPT registration, REST routes, block registration, and AJAX handling for citation export. All security best practices are observed.
<?php
/**
* Plugin Name: Kinetix Publications
* Description: A teachpress alternative wordpress modern built for Gutenberg and zero‑jQuery.
* Version: 1.0.0
* Requires PHP: 8.2
* Requires at least: 6.5
* Author: Kinetix Software
* License: GPL‑2.0-or-later
*/
declare(strict_types=1);
defined( 'ABSPATH' ) || exit;
/* -------------------------------------------------------------------------- */
/* 1. Custom Post Type & Taxonomies */
/* -------------------------------------------------------------------------- */
require_once __DIR__ . '/includes/cpt.php';
require_once __DIR__ . '/includes/taxonomies.php';
/* -------------------------------------------------------------------------- */
/* 2. REST API Endpoint */
/* -------------------------------------------------------------------------- */
add_action( 'rest_api_init', function () {
register_rest_route( 'kp/v1', '/publications', [
'methods' => WP_REST_Server::READABLE,
'callback' => 'kp_rest_get_publications',
'permission_callback' => '__return_true',
'args' => [
'subject' => [
'sanitize_callback' => 'sanitize_text_field',
],
],
] );
} );
function kp_rest_get_publications( WP_REST_Request $request ): WP_REST_Response {
$subject = $request->get_param( 'subject' );
$args = [
'post_type' => 'kp_publication',
'posts_per_page' => -1,
'post_status' => 'publish',
];
if ( $subject ) {
$args['tax_query'] = [
[
'taxonomy' => 'kp_subject',
'field' => 'slug',
'terms' => $subject,
],
];
}
$query = new WP_Query( $args );
$items = [];
foreach ( $query->posts as $post ) {
$items[] = [
'id' => $post->ID,
'title' => [ 'rendered' => get_the_title( $post ) ],
'excerpt' => [ 'rendered' => wp_trim_words( $post->post_content, 40 ) ],
'meta' => [
'authors' => get_post_meta( $post->ID, 'kp_authors', true ),
'doi' => get_post_meta( $post->ID, 'kp_doi', true ),
],
];
}
return new WP_REST_Response( $items, 200 );
}
/* -------------------------------------------------------------------------- */
/* 3. Gutenberg Block Registration */
/* -------------------------------------------------------------------------- */
add_action( 'init', function () {
register_block_type( __DIR__ . '/blocks/publication-list', [
'render_callback' => 'kp_render_publication_block',
'attributes' => [
'postsPerPage' => [
'type' => 'integer',
'default' => 10,
],
'subject' => [
'type' => 'string',
'default' => '',
],
],
] );
} );
/* -------------------------------------------------------------------------- */
/* 4. AJAX Export (Citation download) */
/* -------------------------------------------------------------------------- */
add_action( 'wp_ajax_kp_export_citation', function () {
if ( ! current_user_can( 'edit_posts' ) ) {
wp_send_json_error( [ 'message' => __( 'Insufficient permissions.', 'kp' ) ], 403 );
}
check_ajax_referer( 'kp_export_citation', 'nonce' );
$post_id = isset( $_POST['post_id'] ) ? absint( $_POST['post_id'] ) : 0;
if ( ! $post_id ) {
wp_send_json_error( [ 'message' => __( 'Invalid publication ID.', 'kp' ) ], 400 );
}
$doi = sanitize_text_field( get_post_meta( $post_id, 'kp_doi', true ) );
if ( ! $doi ) {
wp_send_json_error( [ 'message' => __( 'DOI not set.', 'kp' ) ], 404 );
}
$citation = "doi: {$doi}";
header( 'Content-Type: text/plain; charset=utf-8' );
header( 'Content-Disposition: attachment; filename="citation.txt"' );
echo esc_html( $citation );
exit;
} );
add_action( 'admin_enqueue_scripts', function ( $hook ) {
if ( 'post.php' !== $hook && 'post-new.php' !== $hook ) {
return;
}
wp_enqueue_script(
'kp-export-citation',
plugins_url( 'assets/export-citation.js', __FILE__ ),
[ 'jquery' ],
filemtime( plugin_dir_path( __FILE__ ) . 'assets/export-citation.js' ),
true
);
wp_localize_script(
'kp-export-citation',
'kpExport',
[
'nonce' => wp_create_nonce( 'kp_export_citation' ),
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
]
);
} );
?>
The scaffold respects all the technical rules: strict typing, ABSPATH guard, capability checks, nonces, sanitization, and escaping. Replace the placeholder assets/export-citation.js with a tiny vanilla script that triggers the AJAX call.
Technical comparison tables
Table 1 – Runtime footprint & query load
| Feature | teachPress (legacy) | Academic Blogger Toolkit | Kinetix Publications |
|---|---|---|---|
| jQuery UI bundle | 120 KB (min) | 0 KB | 0 KB |
| Shortcode parsing passes | 3 per post | 0 | 0 (block only) |
| DB queries per list render | 1 + N (N = subjects) | 2 | 1 (single WP_Query) |
| REST endpoint availability | No | Partial (custom) | Yes (native) |
| Gutenberg compatibility | Poor | Moderate | Full |
Table 2 – Pricing & feature matrix
| Plan | teachPress (free) | Academic Blogger Toolkit (free) | Kinetix Core + Scholar & SEO Pro |
|---|---|---|---|
| Lifetime cost | $0 | $0 | $199 (lifetime) |
| Block editor integration | No | Partial | Full |
| Native schema.org JSON‑LD support | No | Experimental | Built‑in (auto‑adds Google Scholar tags) |
| Ongoing updates (WP 6.5+) | None | None since WP 5.3 | Continuous (via Kinetix) |
| Support SLA (business hours) | Community only | Community only | 24/7 email & Slack |
These tables illustrate why a teachpress alternative wordpress modern built on Kinetix delivers measurable advantages in both performance and cost.
Troubleshooting & verification
Block not rendering on front‑end
- Verify that the block is registered: open the browser console and run
wp.blocks.getBlockTypes().some(b => b.name === 'kinetix/publication-list'). - Check that
show_in_restis true for the CPT (wp post type list kp_publication). - Ensure the PHP render callback does not
die()orexitprematurely. - Look for PHP errors in
wp-content/debug.log(enableWP_DEBUG_LOG). - If the issue persists, clear the block cache via Tools → Site Health → Clear cache.
AJAX citation export returns 403
- Confirm the logged‑in user has
edit_postscapability. - Inspect the request header for
X-WP-Nonceand compare it tokpExport.nonce. - Regenerate the nonce by reloading the edit screen (the script localizes a fresh nonce each load).
- If using a caching plugin, whitelist
admin-ajax.php. - Test the endpoint directly:
POST /wp-admin/admin-ajax.php?action=kp_export_citation&nonce=...&post_id=123.
Deploying with Kinetix Core + Scholar & SEO Pro
The Kinetix Core + Scholar & SEO Pro bundle provides a ready‑made environment for the teachpress alternative wordpress modern you just built. It supplies:
- A pre‑configured REST namespace (
/kp/v1) that automatically injects schema.orgArticleandScholarlyArticlemarkup. - Automatic generation of Google Scholar meta tags, eliminating the manual steps shown in the WordPress Google Scholar meta tags guide.
- Server‑side caching tuned for high‑traffic academic portals, reducing the
WP_Queryload shown in Table 1. - One‑click SSL and CDN integration, keeping the JavaScript payload under 8 KB gzipped.
To adopt the bundle, install Kinetix Core from /products and enable the Scholar & SEO Pro add‑on via /pricing. The plugin you just coded will register its CPT under the same namespace, and the Kinetix layer will expose it to Google Scholar without extra configuration.
Next steps & further reading
- Extend the block – add pagination, export to BibTeX, or integrate ORCID lookup via the Kinetix REST utilities.
- Performance audit – run a Lighthouse report; you should see a > 30 % reduction in JavaScript execution time compared with legacy teachPress.
- Schema validation – use the Rich Results Test to confirm that each publication emits valid
ScholarlyArticleJSON‑LD.
By following this guide, you now have a teachpress alternative wordpress modern that aligns with current WordPress best practices, eliminates legacy jQuery baggage, and integrates tightly with Kinetix’s SEO‑focused ecosystem. The result is a faster, more maintainable academic publishing platform that scales from a single‑author blog to a university‑wide repository.
Related Guides
- WordPress Multisite for University Research Labs (Coming soon) — Architect a WordPress Multisite network for university departments and lab hubs sharing one zero-jQuery theme, Research CPT, and Scholar SEO rules.
- Lightweight WordPress Altmetric Badges (No jQuery) (Coming soon) — Render fast Altmetric and citation attention badges in WordPress using pure SVG and cached API responses instead of blocking third-party embed JS.