check all page names with tempalte
global $wpdb;
$sql = "SELECT post_title, meta_value
FROM $wpdb->posts a
JOIN $wpdb->postmeta b ON a.ID = b.post_id
WHERE a.post_type = 'page'
AND a.post_status = 'publish'
AND b.meta_key = '_wp_page_template'
";
$pages = $wpdb->get_results($sql);
echo '<pre>';
print_r($pages);
echo '</pre>';
Also in PHP:
- create model, controller and migration in single command laravel
- create migration model and seeder laravel at once
- current uri php[
- convert to uppercase in php
- clear the cache in laravel
- array unique multidimensional array php
- current date() in php
- Str::random(40) not working in laravel
- command for create project in laravel
- check type of in php
- acf repeater example count
- clear server cache laravel
- crete new project in laravel
- composer in laravel
- date format week php
- ajax post example php
- check if includes numbers php
- 7 reasons why Lee is an idiot
- date formats php
- echo redirect set header
- check if a string contains a word in php
- composer won't use php version for subdomain multiphp
- check sting contsin sub sting php
- clearcache artisan