WPIntell

Source evidence

get_option(‘sticky_posts’)

Sticky CPT · support · 2018-01-31T16:10:00+00:00

complaintsentiment
mediumseverity
0.81relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

2 / 25 rows with source links

8.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

23 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
rom22 unresolved
Hi, I’m banging my head right now…. I’m using this plugin, it works fine, I can see it in the admin, I have my sticky post on CPT; and on the data base, I can see it update the sticky_posts in wp_options. But, when I try to use ‘post__not_in’ => get_option(‘sticky_posts’), it doesn’t filter any thing. So I try to var_dump(get_option(‘sticky_posts’)), and all I get is the id of the ‘normal post’, not the full list of id who I can see are in database in the wp_options/sticky_posts. Which mean if I try to use is_stiky in my loop, it only work in ‘normal’ post, not in CPT, which is logic, since get_option(‘sticky_posts’) is not working properly…. Any idea how I can fix that ? it’s driving me crazy 😀 The normal output of get_option(‘sticky_posts’) is the list of all the id in the database/wp_options/sticky_posts, is it not ? Thanks for the help ! Best R In case it’s useful to someone, I ended up dumping the plugin, and made my own metabox with a simple check box, then save the post id using the Options API, and now I can get the id I’m looking for using get_option(‘my_stiky_cpt’).

Comments

1 shown
rom22 2018-02-10T11:00:00+00:00

In case it’s useful to someone, I ended up dumping the plugin, and made my own metabox with a simple check box, then save the post id using the Options API, and now I can get the id I’m looking for using get_option(‘my_stiky_cpt’).