This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Display post title using post ID | |
echo get_the_title( 5 ); | |
// Display post title and safely escape value | |
echo esc_html( get_the_title() ); | |
// Using the_title function to automatically echo the title, while you can append or prepend the title using the function as displayed below | |
the_title( 'Before:', ' - After' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Display post title | |
echo get_the_title(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url_parts = parse_url( home_url() ); | |
$current_url_with_query_string = $url_parts['scheme'] . "://" . $url_parts['host'] . add_query_arg( NULL, NULL ); | |
echo $current_url_with_query_string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $wp; | |
$current_slug = add_query_arg( array(), $wp->request ); | |
echo $current_slug; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $wp; | |
$current_url = home_url( add_query_arg( array(), $wp->request ) ); | |
echo $current_url; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media (prefers-color-scheme: dark) { | |
:root { | |
--contrast: #fff; | |
--contrast-2: #000; | |
--contrast-3: #000; | |
--base: #1e1e1e; | |
--base-2: #212121; | |
--base-3: #212121; | |
--accent: #1e90ff; | |
--global-color-8: rgba(180, 180, 191, 0.1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$meta_query_args = array( | |
'post_type' => 'page', | |
'order' => 'ASC', | |
'meta_key' => 'city_name', | |
'orderby' => 'meta_value' | |
); | |
$meta_query = new WP_Query( $meta_query_args ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$meta_query_args = array( | |
'meta_query' => array( | |
'relation' => 'AND', | |
array( | |
array( | |
'key' => 'city_name', | |
'value' => array('New York City', 'London', 'San Francisco'), | |
'compare' => 'IN' | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$meta_query_args = array( | |
'meta_query' => array( | |
array( | |
'key' => 'city_name', | |
'value' => array('New York City', 'London', 'San Francisco'), | |
'compare' => 'IN' | |
) | |
) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$meta_query_args = array( | |
'meta_query' => array( | |
array( | |
'key' => 'featured_post', | |
'value' => 'yes', | |
'compare' => '=' | |
) | |
) | |
); |