Using featured image of blog archive page

You need to grab the ID of the page you’ve set as your Posts page in Settings > Reading in order to access its properties. To do that, check for the page_for_posts option, which returns the ID: $page_for_posts = get_option( ‘page_for_posts’ ); if ($page_for_posts && has_post_thumbnail($page_for_posts) { $thumb_id = get_post_thumbnail_id( $page_for_posts); $url = wp_get_attachment_url( $thumb_id … Read more

Blog previews on custom page with more buttons

Now that you have a Page set up as your “posts page,” there are a few things you may want to do. Each theme is built a little differently, so pick the ones that apply in your case. Display the Posts First, create a child theme (which basically just means you create one “style.css” file … Read more

Why the Gutenberg Editor is Not Available In My WP Site?

You have to declare that your custom post type supports the editor, and have show_in_rest set to true when registering the post type. Here is what the official dev hub says about supports: ‘supports’ (array) Core feature(s) the post type supports. Serves as an alias for calling add_post_type_support() directly. Core features include ‘title’, ‘editor’, ‘comments’, … Read more

I want to display my 2. latest post

Try below code: It will display the second and third latest posts. $the_query = new WP_Query(array( ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’, ‘order’ => ‘DESC’, ‘posts_per_page’ =>’2′, ‘offset’ => 1 )); if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); the_title(); the_excerpt(); endwhile; wp_reset_postdata(); else : __(‘No post found’); endif;

Put post urls into their own category

You can’t add subfolders on individual posts. You can go to Settings > Permalinks and set it up there – you’ll want to use a custom structure: /blog/%category%/%postname%/

How can I display tags as categories?

If you can setup url query parameters and when user navigates to tagfillterPage page with wp_query it should work. https://examples.com/tagfillterPage/?filltertag=tagname $querytag = $_GET[‘filltertag’]; $args = array( ‘tag’ => $querytag ); // Custom query. $query = new WP_Query( $args ); // Check that we have query results. if ( $query->have_posts() ) { // Start looping over … Read more

Change Header Image on Blog Post for Mobile View

You’re not calling the class correctly. The container has both the page-banner and the bg classes, so you should write it like this: .page-banner.bg And the class post-id-41012 doesn’t exist in your document. postid-41012 does. So try this way: @media (max-width: 767px) { .postid-41012 .page-banner.bg { background-image: url(‘https://staging3.ryanlawn.com/wp-content/uploads/2021/09/ggob-blog-banner-all-star-2021-m.jpg’) !important; } }