Questions tagged [posts]

Blogging and other social media activities usually provide mechanisms allowing users to provide content of their own. One such unit is usually referred to as a post.

Blogging and other social media activities usually provide mechanisms allowing users to provide content of their own. One such unit is usually referred to as a post.

973 questions
4
votes
4 answers

Custom single page for custom post type, wordpress

I've just figured out how to make custom post types and feed them out onto a page, I am wondering if I can change the single post pages for them? Can I just set up a single-news.php for example? If so, how would that PHP file be formatted and how…
ajmajmajma
  • 13,712
  • 24
  • 79
  • 133
4
votes
3 answers

How to Toggle post content within a "post" title in a page?

I'm trying to give all "posts" title in a specific page. So If someone clicks on that posts, it's content must be toggle below the title and if some clicks the title again then the content must hide. I solved half of the problem with the help of…
Shoeb Mirza
  • 912
  • 1
  • 11
  • 30
4
votes
0 answers

Wordpress - Approve modified posts

I simply want to be able to re-approve my contributor's edits to an already published post. so when they edit a post it gets sent back for approval. is there a way to do this?
Idra
  • 333
  • 1
  • 3
  • 5
4
votes
6 answers

WordPress get category ID from URL

I have hard time trying to find the solution, does somebody know how to get this: I have one WordPress post in more than one category, but only one is permalink category. I need to get the ID only of that permalink category (I need this info so I…
Danielp
  • 47
  • 1
  • 1
  • 5
4
votes
1 answer

wordpress: SQL to clean posts, terms, relationships, taxonomy (and other associations) by post_title

I need an SQL to clean my wordpress database by post_title. For example, the following finds all posts from wordpress that contain the word "apple" in the title: SELECT * FROM wp_posts WHERE post_title LIKE '%apples%'; And this deletes those same…
Erik Malson
  • 117
  • 2
  • 11
3
votes
0 answers

Comment/like-count from a facebook post

Any ideas how to get the likes/comment count from a Facebook post - fast? My idea was to get the stats of every single post, but it takes too long. $post = $facebook->api("/".$array['PostID']."/?fields=comments,likes", array()); $likes_count =…
3
votes
1 answer

Making public posts via Facebook App?

I recently noticed that posts from my app were going to all-friends even when I requested they be public. Through the response to my bug report (https://developers.facebook.com/bugs/191063590970288) I learned about the "App activity privacy"…
ex-nerd
  • 1,317
  • 12
  • 19
3
votes
0 answers

Linked-in webp support

As of this article posted in 2021, it looks like webp is not supported for Linked-In posts: https://beamtic.com/webp-on-linkedin I have a website with webp compressed images and my images are not showing in the posts. Does Linked-In still not have…
Jason O
  • 110
  • 6
3
votes
1 answer

Facebook graph "user/home" feed now contains activities as post items that are difficult to identify

When I make the Graph call https://graph.facebook.com/me/home , I get back a paged set of the posts on my feed. Recently, I've started to get items that appear to represent things like "John Doe liked a page". They are marked as a link, but if I…
giff
  • 1,720
  • 1
  • 14
  • 21
3
votes
0 answers

How to get instagram saved posts including collections tags?

When you save a post in instagram, you have the option to organize it by a custom tag that you type. Instagram calls it Collections. So I'm trying to get access to my Instagram saved posts, which is neatly done by this tool…
3
votes
3 answers

WordPress order posts by 2 custom fields at once

I want to order the posts by 2 custom fields in the same call. How is this possible? This next code order successfully, but only by only 1 NUMBER custom field (not STRING): add_action('pre_get_posts', function ($q) { if ( !is_admin() //…
Elron
  • 1,235
  • 1
  • 13
  • 26
3
votes
3 answers

Get the current post category name inside while loop

I created a custom post type "stm_media_gallery" And three category inside this custom post type. I want to display category name associated with each post. 'stm_media_gallery',…
Vivek
  • 33
  • 2
  • 9
3
votes
1 answer

Order BY Most Liked And Published Between Previous Week Monday And Next Week Monday

I have a code which sorts the content by most liked, but I would like it to show the most liked in between previous week monday and next week monday. And the posts must be published in that time frame. Tho I have no idea how to sort by published…
3
votes
2 answers

Wordpress get-posts without content (to reduce overhead)

Scenario: I am creating collapsible panels in the sidebar and displaying ALL categories as DIVs and all Posts links in those category DIVs. Simple enough. I got all categories by get_categories('orderby=name&order=ASC') and now looping through every…
WhatIsOpenID
  • 1,071
  • 4
  • 12
  • 20
3
votes
3 answers

Show posts from query randomly

I have this query - 'adverts', 'numberposts' => 1, 'order' => 'random', 'meta_query' …
Lucy Brown
  • 264
  • 4
  • 17
1 2
3
64 65