Make sticky post with FacetWP

Ok, I figured it out myself. So maybe I can help someone out with the same question. I made a custom field TRUE / FALSE called “featured”. In facet WP I created this query: <?php return array( ‘post_type’ => ‘custom_post_type’, ‘post_status’ => ‘publish’, ‘meta_query’ => array( ‘is_featured’ => array( ‘key’ => ‘featured’, ‘compare’ => ‘EXISTS’ … Read more

How to tell if a page has subpages for Custom Post Types

This code will return an array with IDs of all pages having sub pages. Hope you were looking for it 🙂 $args = array( ‘post_type’ => ‘page’, ‘post_status’ => ‘publish’ ); $parentPages = array(); // an empty array to store pages with childs $pages = get_pages($args); // Looping through all pages and then we’ll check … Read more

How to get User Avatar Image with link to Author and User name in Html Title tag?

My god 😛 It was as simple as html tags, I just didn’t know the correct wordpress functions to use. Here it go, for future reference: <a href=”https://wordpress.stackexchange.com/questions/305561/<?php echo get_author_posts_url( get_the_author_meta(“ID’ ), get_the_author_meta( ‘user_nicename’ ) ); ?>”> <img src=”<?php echo get_avatar_url( get_the_author_meta( ‘ID’ ) ); ?>” title=”<?php echo get_the_author(); ?>”> </img></a>