Skip to content

A Composer package for WordPress that allows you to query posts based on what the title starts with.

Notifications You must be signed in to change notification settings

wp-forge/wp-query-starts-with

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

WordPress Query Starts With

WordPress Versions PHP Versions

A Composer package for WordPress that allows you to query posts based on what the title starts with.

Installation

Install Composer.

In your WordPress plugin or theme directory, run:

composer require wp-forge/wp-query-starts-with

Make sure you have this line of code in your project:

<?php

require __DIR__ . '/vendor/autoload.php';

Usage

When creating a custom query:

<?php

$query = new WP_Query(
	array(
		'post_type' => 'post',
		'starts_with' => 'Pre', // This is case-sensitive and must match the first part of the post title exactly.
		// ...
	)
);

About

A Composer package for WordPress that allows you to query posts based on what the title starts with.

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages