Skip to content
Coding Wiki

Coding Wiki

Personal notes

  • Development
    • Front End
      • Aoda
      • Bootstrap
      • CSS
      • jQuery / JavaScript
      • Plugin Frontend Additions
      • ReactJS
    • Back End
      • ACF
      • Database
      • Laravel
      • Linux
      • PHP
      • WordPress Functions and Hooks
  • Processes
    • Creating a new project
  • Plugins
    • Internal
    • External
  • Tools
    • Desktop Setup
      • Compilers
      • Cross Browser Testing
      • Docker
      • PuTTY
      • WAMP
    • Domains and Emails
      • 1&1
      • GoDaddy
    • Source Control
      • Bitbucket
      • Git
      • HQ Deploy
      • SourceTree
    • Server Setup
      • Flywheel
      • Google Compute
    • Online
      • Google Analytics
  • Install new site on server
  • Home
  • / Archives

Tag: _wp_page_template

Posted on March 1, 2017January 29, 2022

Get page template ID – WordPress

CategoriesBack End, Development, WordPress Functions and Hooks

Get the page ID with a page template assigned to it

$sql = "select post_id from $wpdb->postmeta where meta_key like '_wp_page_template' and meta_value = 'template-products.php'";
$result = $wpdb->get_results( $sql );
foreach ( $result as $value ) {
    $page_id = $value->post_id;
}
wp_reset_query();

Most Viewed

How to set state with dynamic key-value pair in React under Development , Front End , ReactJS

Move repository from Bitbucket to GitHub with all branches and commits under Bitbucket , Git , Source Control , Tools

Install AIMEOS Laravel project under Back End , Development , Laravel

Set Up an SSH Key for SourceTree (Windows) under Desktop Setup , Source Control , SourceTree , Tools

GitHub Updater under External , Plugins

Edit old commit message under Git , Source Control , Tools

Create React Project under Development , Front End , ReactJS

How to load SSH Keys to SourceTree under Source Control , SourceTree , Tools

Creating a new project under Processes

Outdated IE banner under Development , Front End , jQuery / JavaScript

Installing Gulp under Compilers , Desktop Setup , Tools

Deploy a website to a remote server with Git push under Back End , Development , Git , Linux , Source Control , Tools

Create JSX Project under Development , Front End , ReactJS

Adding Google Analytics 4 (GA4) Tracking to React App under Development , Front End , Google Analytics , Online , ReactJS , Tools

Animate elements if visible in viewport (page scroll) under Development , Front End , jQuery / JavaScript

Laravel Frontend under Back End , Development , Laravel

Automatically assign parent taxonomy terms to posts under Back End , Development , WordPress Functions and Hooks

Create new Laravel project under Back End , Development , Laravel

jQuery – detect click event on pseudo-element under Development , Front End , jQuery / JavaScript

Set up new project on HQ Deploy under HQ Deploy , Tools

Tags

  • backend
  • bootstrap
  • css
  • custom
  • divi
  • embed
  • equal height grid
  • fancybox
  • flexbox
  • font
  • git
  • homestead
  • IE
  • import
  • innerHeight
  • install
  • internet explorer
  • javascript
  • jquery
  • js
  • laravel
  • lightbox
  • link
  • local
  • login
  • mask
  • menu
  • modal
  • plugin
  • pseudo elements
  • resize
  • scroll
  • scrolling
  • scrollTop
  • setup
  • shortcode
  • style
  • text
  • video
  • vimeo
  • Visual Composer
  • website
  • windows
  • wordpress
  • youtube
Proudly powered by WordPress