Questions tagged [featured-post]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

How to mark only one post as Featured post?

Am working on a blog page and I want to have a featured post as a banner. I have no idea how can I make only one post can be marked as the "Featured" so if another post is marked as "Featured" it ...
0
votes
0answers
8 views

Pin featured posts to main slide without changing date

I want to make a modification to a slide that appears on my main page, but I don't know how to do that. The site uses the "Carmack" template and here is his template: https://prothemedesign.com/theme-...
0
votes
1answer
59 views

How to display the featured post on the category page?

I have created a feature post check box on the post page. Now what I am doing is if any user-selected that checkbox then I have to show that post on the category page. I tried below code but it's not ...
0
votes
0answers
51 views

WP_Query on meta returns featured posts (not matching meta query)

Migrating a site to wordpress wanted to redirect old urls so I made a function that would catch 404, look for a meta value that would match the number in the url to then redirect. It worked like a ...
0
votes
0answers
9 views

Randomise custom posts after featured posts on top

What do I need to do to this code to ensure that all posts FOLLOWING the featured posts are randomised on each page load? else if ( $sort_by == 'featured_top' ) { $query_args['orderby'] = '...
0
votes
1answer
30 views

Featured images duplicating and replacing next image

Took over a project, and one of the errors is the featured images (and certain others rendered in a similar way) are duplicating themselves and replacing the next image thumbnail. <a href="&...
-1
votes
1answer
14 views

Feature Image Showing Too Big

My feature images keeping showing up too large, I have tried to resize the images and re-upload but they are still showing up too big. I have tried to put in CSS code and gone onto Media setttings ...
0
votes
0answers
10 views

Need differrent images for Thumbnail and Feature

I need different images for thumbnail and featured image. Feature image will be shown only at the time of reading (on top of the post); Thumbnail will be shown everywhere except inside my content. ...
0
votes
1answer
32 views

How do I link a featured photo to it's post?

I cannot change the url of the photo in the featured-image edit section. The page can be found at https://irregularus.com/tips-and-stories/ and if you click on the picture you will see that it just ...
0
votes
2answers
23 views

How do I change the size of the feature picture of a single post?

Every time I select a featured photo for a single post, the size is always adjusted and it's massive. I have changed the size of the photo within WordPress, outside of WordPress, added code to ...
0
votes
3answers
1k views

Gutenberg editor get post featured image by id

How can I show a post featured image by post id in gutenberg editor? I have a slider with latest posts and when I iterate through over posts I would like to show the post featured image as well. Here ...
0
votes
1answer
23 views

Automated mark posts as featured every day

Hello Wordpress Community, I want to build myself a "recipe of the day" functionality. I'm looking for a way to mark 3 Custom Post Types per day as "Featured Posts" by a plugin or Cronjob. The ...
1
vote
1answer
41 views

Show Featured Post Only On The Homepage

Before the content/loop I have this featured post on the top. The problem is that it shows up in the other pages besides the home. I tried several solutions, but I am unable to hide it. Any help would ...
0
votes
2answers
40 views

WP site homepage displays url link at beginning of each featured post

Home page on my wordpress site displays url code before showing the text of my featured posts. They display normally once the post is called in their respective pages so the issue is just on the home ...
0
votes
2answers
33 views

Custom Post Type featured option

I have created a Custom Post Type called Products. Now I need a functionality that will allow me to select or check a product as featured. There can be only one featured product. When one product is ...
1
vote
1answer
86 views

How to remove sticky post capability for a specific user role?

All is in the title. Does someone know a way to do that ? Thanks !
1
vote
0answers
290 views

How do I create a function that simulate the click on Update button for all posts?

I made a child function.php with this code. All new posts will automatically use the attachment id for the image I have uploaded to my Media Library. function wpsites_auto_set_featured_image() { ...
-1
votes
1answer
2k views

How to show featured post first, then separate loop for other posts

I have followed the instructions from the Codex for multiple loops, but am having problems. I have a category called 'Featured' and a tag called 'Canada 2017' which are the posts I would like to ...
0
votes
2answers
700 views

How to filter get previous post function by meta value DESC and post date DESC?

My loop displays featured posts and then posts in reverse chronological order. However when I use <?php echo get_previous_post(); ?> it grabs posts in reverse chronological order. How do I ...
0
votes
1answer
184 views

Rotate featured post image

I am trying to have a s all box on my home page that will show the most recent 4 custom posts that are set with a featured tag. It is working and is showing the image of the most recent post and then ...
0
votes
1answer
2k views

Debugging why featured images have stopped showing in WooCommerce on the homepage [closed]

At some point, the "Featured" images that usually showed up on our homepage have stopped showing. I've done some digging and found this template code in index.php (this is the Artificer theme by ...
2
votes
1answer
7k views

Display featured products through custom loop in WooCommerce 3 [closed]

I was wondering if someone could help me. I am trying to display featured products using a custom loop. Before WooCommerce 3 I used following loop, which worked perfectly: <?php $args = [ '...
1
vote
2answers
150 views

Adding a 'featured' class to certain posts

I would like users of my theme to be able to mark some posts as more important so that my theme can draw more attention to them. I'm not sure about the best way to go about this? Is it possible to ...
0
votes
0answers
145 views

How can i link my featured image to be clicked and the file will be downloaded

Here, i have a modal, where it holds my featured image. What i want is, how can i link my featured image to a file/pdf so that if user clicks the featured image, then there will be a pdf downloaded. ...
0
votes
1answer
641 views

Remove any product that is featured from regular display loop [WooCommerce]

I have set up a custom loop to display featured products at the top of their relevant category pages. but now I would like to go about removing featured products from the regular loop below, which is ...
3
votes
1answer
101 views

Three different post types on homepage

Update: Thank you for the answer but after implementing this code it's breaking the theme/site. I'm sure it's me but here's my functions.php file: // Custom posts for homepage function ...
0
votes
1answer
65 views

Singleton Custom Field (Meta Box)

How do I create a custom meta box for posts which have a boolean data type and can be true only for one post. I want it to be falsified for all other posts when it's set on one post. Is there a hook ...
0
votes
1answer
36 views

Filter article that has featured image to shown on homepage [duplicate]

How do I display article that has featured image uploaded? I using premium theme. I found that all of the themes don't have this feature. Am I need to configure this in php file? Or there is ...
4
votes
1answer
78 views

Add a single featured post to all pages?

Within wp-admin, we need the ability to select a single post as the featured post. This featured post will be displayed on all pages. I know I can make a post "sticky" but we would like to have only ...
0
votes
1answer
121 views

Get template part with CPT and Custom Taxonomy conditionals

I have two Custom Post Types Video and Gallery and a Custom Taxonomy Status with the term Featured. Right now I'm showing these CPT in my index.php, but I want to style each of them, so I'm using ...
3
votes
2answers
2k views

Is there a hook / action that is triggered when adding or removing a post thumbnail?

I'm trying to update a custom field after a post thumbnail (Featured Image) is either added or removed from a post. The aim of this is to keep track of whether a featured image has been added or ...
0
votes
2answers
678 views

How to have a different section for a special category of posts in landing page?

I wish to have a different section for a certain category of posts displayed in the landing page of my WordPress website, while posts of various other categories display in an other section. Is this ...
0
votes
1answer
67 views

Add specific class to featured posts

Actually I'm using this loop to get my posts in homepage: <ul class="news"> <?php // The query $page = (get_query_var('paged')) ? get_query_var('...
0
votes
1answer
339 views

Featured-Content/Featured Posts With Random Order

I am working on dailysuit.de, which features four featured posts at the top, defined by a certain tag. The order is newest to oldest. How do I get this order randomised (and not newest to oldest)? I ...
19
votes
8answers
62k views

Display featured products through custom loop in woocommerce on template page

I would like to display 6 featured products from my woocommerce store on my home-page.php template. After some researched I found that the right way to do this was through a custom loop,( I do not ...
0
votes
1answer
203 views

Using lower resolution/size images for thumbnails on posts index

In each of my post I set a feature image with a width of 800px. This is fine, however if I browse to the blog index page, which shows all posts (the feature image + an excerpt), then I end up with a ...
0
votes
2answers
41 views

how do i make this loop work

Apologies I am a PHp beginner and I have no idea why this loop is not working on my tag.php page any help would be welcome. <?php get_header(); ?> <div class="posts"><!-- BLOG --> ...
2
votes
1answer
6k views

Find posts without featured image? [duplicate]

I need way to find post(s) without featured image set. I use WP as gallery site and for every post I set featured image. I wish to check if there is any post(s) without featured image. Any code to ...
0
votes
2answers
66 views

Prevent a query from duplicating

Trying to show featured posts on home using catID,but it is being duplicated. Is there any way to prevent it from duplicating: <?php query_posts("posts_per_page=1&cat=1"); if ( have_posts() ) ...
0
votes
1answer
49 views

Show image if a post is featured

I know that posts that are sticky show on top but I want to add an image to show that is featured is there any code I could use
1
vote
2answers
414 views

What is the best way mark entries as featured?

In quite a few wordpress projects I have a request in which Projects (or other post type) have to be featured in the Portfolio page (or other listing page) instead of the default date sorting lists. ...
0
votes
1answer
82 views

Check if parent post is sticky on attachment page?

I use this code on post template (single.php) to check if current post is sticky: <?php if ( is_sticky() ) echo 'Post is sticky.'; ?> But it is not working on attachment page template (image....
3
votes
2answers
2k views

XMLRPC and Underscored custom fields

I was creating my application to automate all of my blogs from my desktop. Target, I'll post blog. That's all. I used XMLRPC service, as you know "xmlrpc.php". I built many of parts, near to done... ...
0
votes
1answer
471 views

Display Custom Post if custom field is marked

I'm trying to get a custom post to show up on the front page only if a custom field I made is marked, otherwise it sould look for the one that is (and only one, not all marked). I currently have this:...
5
votes
1answer
955 views

Is “Featured Content” in Twenty Fourteen done with a plugin, or is it native in WP4.0?

I found that Twenty Fourteen offers users to have Featured Content on there websites. That's great, because I had written my own little script for such an occasion. But if the functionality is already ...
0
votes
2answers
1k views

upload image only

I create post page from front end , and i add code for uplaod feature image. I use this code if (!function_exists('wp_generate_attachment_metadata')){ require_once(ABSPATH . "wp-admin"...
1
vote
0answers
65 views

Added Custom Post Type and the View Option Doesn't Work

I would like some pointers on fixing the Permalinks structure for a custom post type I added. Like many Custom Post Types this plugin uses the Custom Type Meta Box, and sets a featured image. All of ...
0
votes
0answers
25 views

Why I have this strange behavior when I try to exlude the featured post from posts visualization?

I am quite new to WordPress theme development and I have a strange behavior with this custom theme on which I am working: http://lnx.asper-eritrea.com/ As you can see in the home page I have 2 areas ...
1
vote
2answers
1k views

How do I style the first two posts of a loop

I'm trying to style a single loop to look like so --------------------------------------------- || | || || || | ||--------------|| || ...
0
votes
2answers
2k views

Show last 5 posts from featured category on query carousel slider with prev and next button

I managed to set up a query carousel slider on my test-site. How can i adapt the slider to show the 5 latest posts from my featured post category with thumb, title and link to the post instead of the ...