Author:
erics, January 5th, 2021
|
global $wp; $slug_missing_outside_slashes = add_query_arg( array(), $wp->request ); $current_url = home_url( $slug_missing_outside_slashes ); $form_action = '/' . $slug_missing_outside_slashes . '/'; |
https://codex.wordpress.org/Determining_Plugin_and_Content_Directories
Categories: How-To's, Technology Tags: Current, howto, Page, Path, Slug, tips, URI, URL, WordPress
|
No comments
Author:
erics, January 24th, 2016
|
add_action( 'genesis_entry_content', 'featured_post_image', 8 ); function featured_post_image() { $categories = get_the_category(); foreach ($categories as $category) { // You can use slug, ID or any other identifier from the WP_Object //if ($category->term_id == 288) { if ($category->slug == 'your-slug-here') { print '<div id="sub-header-image">'; the_post_thumbnail('post-image'); print '</div>'; } } return; } |
Categories: How-To's, Technology Tags: Categories, Category, howto, POST, Single, Slug, tips, WordPress
|
No comments