Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [featured-post]

The tag has no usage guidance.

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
19 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
2answers
512 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
18 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 ...
0
votes
0answers
57 views

Add hide featured image option

Hello, I wold like to add a check-box or button to have a choice between hide or display featured image in single post. i'm in wordpress 5.0.2 This is the code of my simple single.php in the theme : ...
0
votes
0answers
14 views

Automatic upload external image and set as featured post

I have a variable that automatic generates the url of thumb from youtube. For example one custom post has $video_thumb_url = 'https://img.youtube.com/vi/' . $matches_1['1'] . '/maxresdefault.jpg'; ...
1
vote
1answer
35 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
33 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
29 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
57 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
207 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
1k 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
587 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
127 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
6k 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
113 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
122 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
543 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
62 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
35 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
77 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
114 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
596 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
66 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
305 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
53k 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
195 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
40 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
5k 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
57 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
360 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
80 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
344 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
913 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
963 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
64 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
24 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 --------------------------------------------- || | || || || | ||--------------|| || ...
-1
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 ...
-1
votes
1answer
1k views

Previous / next posts using featured image thumbnail as links

I need navigation to two previous and two next posts, inside same category. I made it working great for one previous and one next post inside same category. This is what I have now. Previous post: &...
1
vote
3answers
2k views

Exclude posts from homepage having a specified tag

I am pretty new in WordPress development and I am trying to implement this custom theme that handle the so called featured posts As you can see in the posts area of the homepage I have the Articoli ...
1
vote
1answer
5k views

How to get relative URL of medium sized featured image?

How to show featured image (medium sized) relative URL (relative to the website root)? I need something like this: uploads/214/07/image-600x400.png I tried with this: if ( has_post_thumbnail()) { ...
-2
votes
1answer
2k views

Orientation of featured image in post?

Is it possible to show orientation of featured image in post on single.php? For example: Orientation of featured image is: portrait / landscape. I have found that this could be done by calculating ...
-2
votes
1answer
591 views

How to show file size of featured image? [duplicate]

How to show file size of featured image in post on single.php? For example: File size of featured image is: xx kb/Mb I need size of featured "full" rezolution, also file size of "medium" resolution ...