Questions tagged [posts]

Posts are the core of WordPress. They store content, are categorized, and are expansible with meta. Posts are grouped by post type, and within their post type by taxonomy (though a taxonomy can span more than one post type).

Filter by
Sorted by
Tagged with
0 votes
1 answer
9 views

Global $post value outside the loop

On a category archive page, in a filter called from a block outside a loop, I noticed that the get_post function with a null first parameter returns the first loop's post. Is it supposed to return ...
challet's user avatar
  • 111
0 votes
0 answers
14 views

Display posts based on the selected category when no subcategory is chosen

The following code displays posts based on subcategory. First dropdown is a custom taxonomy category, second dropdown narrows down the search to subcategories associated with selected category. My ...
Sebastian Szydlowski's user avatar
0 votes
0 answers
6 views

Need checkbox option within the dropdown filter [closed]

I have created a custom post type with the Jet Engine plugin and used the Jet Filter plugin for post filtering, which provides a dropdown or check filter. However, I need a checkbox option within the ...
suganth's user avatar
1 vote
1 answer
52 views

Set Featured Image of a post

How to set Featured Image when creating post using $post_id = wp_insert_post( $args ); ?
Foysal's user avatar
  • 449
0 votes
1 answer
10 views

Modify Post URL Programmatically

I am creating post using wp_insert_post(). I would like to insert Post URL at that time. How can I do that ?
Foysal's user avatar
  • 449
0 votes
1 answer
12 views

Insert Tag in WordPress Post

I have below code. $args = array( 'post_title' => $this->h1, 'post_content' => $this->profile_text, 'post_status' => 'publish', 'post_type' => 'post', '...
Foysal's user avatar
  • 449
1 vote
0 answers
6 views

Custom group pattern layout is not showing in posts

I have created a group layout in one of my blog posts. I can import that layout into any new blog post. It shows perfectly in the editor option but doesn't show anything in the view page when I save ...
Sayed Newaz's user avatar
0 votes
0 answers
9 views

Post URL redirecting to homepage

Please I need help, i have added dynamic content using Pods - Custom Content Types and Fields and the post url button is redirecting me to homepage instead of a single post page.
Cathrine's user avatar
0 votes
0 answers
47 views

Code understanding

I found below code in a Plugin. const sent_urls = () => { const formData = new FormData(); formData.append('action', 'start_parsing'); formData.append('...
Foysal's user avatar
  • 449
1 vote
0 answers
18 views

Is there a way to eliminate flyout menus when adding a post?

It seems like each new version of wordpress adds more intermediate menus and menu options than the previous. Particularly heinous examples include the Preview button with its form-factor checkboxes, ...
nich's user avatar
  • 13
0 votes
3 answers
107 views

Fatal error: $post is null?

I am getting this fatal error when I try to add a new post, page or CPT. Warning: Attempt to read property "post_type" on null in /public_html/wp-includes/post.php on line 7502 Warning: ...
ban-geoengineering's user avatar
0 votes
1 answer
23 views

How to get a list of all posts and their categories?

Basically I just need to have a table like this: Post title Categories Post 1 Category 1, Category 2 Post 2 Category 2, Category 2.1 ... ... From MySQL Query to Retrieve Category from wp_posts I ...
Ooker's user avatar
  • 332
0 votes
1 answer
24 views

Error counting posts of category

On a WP page we are counting and displaying the amount of posts for all categories. Meaning, all sub category posts should be counted as posts for the main category. Let's say, the name of the main ...
JonSnow's user avatar
  • 115
0 votes
0 answers
6 views

show the entire contents of posts in an archive page as a table

I am in trouble and am asking for your advice on how to proceed. I have created a custom post and inside I have created custom fields. I need to display all the posts as a table (one below the other) ...
bastiag5's user avatar
0 votes
1 answer
21 views

ACF - Tags not showing up in Custom Post Types

I have a tags taxonomy and then I've added it to my CPT, however it does not give me the option to add tags to my CPT now. How do I get it to do that?
user3382763's user avatar
0 votes
1 answer
30 views

Hide load more button if no more post in selected category

I have built a ajax post loading program in wordpress where i load post depending on category and current post type. ive got it all working except hiding the load more button if no more post. ive been ...
Beep's user avatar
  • 29
0 votes
0 answers
15 views

Passing total post count to javascript

I have a ajax post loading program, I can load more post on click of a button. Problem im having is getting the button to hide or show less when no more post. I can query out the post count in PHP as ...
Beep's user avatar
  • 29
0 votes
2 answers
23 views

List of published post dates only outputting one date

I have the following, which works, but only returns a single post date: function test() { $args = array( 'posts_per_page' => -1, 'post_type' => 'post', 'post_status' => 'publish' ); $...
WPdummy's user avatar
0 votes
0 answers
35 views

Don't need backdate publishing option in wordpress website

I don't want backdate publishing of posts on my wordpress website. Is there any way to stop authors from publishing posts in backdate?
Kamal's user avatar
  • 1
0 votes
1 answer
74 views

WP_Query for multiple post types just shows one

I have an issue, that I do not really understand. I hope, you can help me. I would like to have a WP_query for multiple post types: $query = array( 'category_name' => $category, 'post_type' =&...
wepli23's user avatar
1 vote
0 answers
8 views

Wordpress menu disappears in category pages

I have a custom query to order and display posts in my functions.php, and I noticed that the navigation menu disappear in those categories! function my_filtro_ed_ordine( $query ) { if ( ...
Arianna's user avatar
  • 11
1 vote
1 answer
36 views

REST API - Retrieving posts with custom status

I am still in the process of learning how to use the WordPress REST API and am attempting to retrieve all posts which have been assigned the custom status "archived". I have already created ...
Samuel's user avatar
  • 11
0 votes
0 answers
23 views

Default post showing more than intended

I have a ajax set up where I am loading post categories via ajax request on click of a button. I have a default query that is loaded for when the ajax filter is not set so a default state. It should ...
Beep's user avatar
  • 29
1 vote
0 answers
51 views

Ajax load more post button not showing

I have some alpine.js and ajax that is loading wordpress posts on click of a button, this is working well. however I am now trying to add some code to the button to hide if no post available to load, ...
Beep's user avatar
  • 29
0 votes
0 answers
7 views

WP galleries in posts after import. How do I do it?

I moved the website posts with Wp All Export and All import, which worked fine, but many of the posts contained galleries (Wordpresses gallery with [gallery] shortcode). The problem is that now the ...
vicartdesign's user avatar
1 vote
1 answer
34 views

Wordpress Rest API Post request from AMP

I am trying to figure out how to send a post request to a WP Rest API function on an AMP Page. The endpoint requires 2 fields, post_id & nonce. /wp-json/wordpress-popular-posts/v2/views/[post_id] ...
GoSSDHosting's user avatar
1 vote
0 answers
16 views

Search result page admin panel - display values from the result's metaboxes

Help me please.. I have plugin for vacancy/resume/companies in the form of posts on Wordpress. The task is to perform a standard Wordpress search for arbitrary fields inside the record. The fields ...
Givanni Dev's user avatar
0 votes
1 answer
8 views

Permalink issue with new blog posts > getting 301 redirect

My permalink structure is: https://website.com/sample-post/ However, each new blog post is getting a 301 redirect from a link like this: https://website.com/2024/01/30/ I see that each new blog post ...
Meek Mill's user avatar
0 votes
0 answers
10 views

How to set something to added automatically to the post

I'm using the 2024 theme and just wanted to know if it has a feature which I can set something like a text to be added automatically after the first two or three paragraph of my posts. The Astra theme ...
Poorya Ghorbani's user avatar
0 votes
0 answers
13 views

Show the author only own types of publications. (JetEngine, Elementor)

I created a custom post called Locations using Elementor + JetEngine. I also created a User Profile Builder Dashboard with the help of this, where the user (client) can add a location. But the problem ...
user239691's user avatar
1 vote
1 answer
40 views

How to check if the post exists in any of the categories?

What I am doing is, I have to check if the post exists in any of the categories or not. I have tried below two codes but it's not working for me. This is the first code foreach ($scats as $key => $...
Naren Verma's user avatar
0 votes
1 answer
40 views

Only an admin can add new tags

Hello, How can I restrict the addition of new tags for users who are not administrators in Posts -> Tags?
user59's user avatar
  • 1
0 votes
1 answer
31 views

Changable favicon based on post-featured image

its possible use to change the favicon on based the post-featured image icon? I use 100x100 size or 64x64 icon images on my posts. I want these icons to show as a favicon also. if some posts not have ...
SS Apps's user avatar
0 votes
2 answers
57 views

Server 500 error when updating post using block editor

My client's website has a single post that when updated/saved using the block editor displays the following in the browser console: XHR Post Status 500 https://www.wanderwoman.ca/wp-json/wp/v2/posts/...
Mike Hermary's user avatar
0 votes
1 answer
25 views

Redirection - bulk edit 404s to new tomain

Please help. I moved all (1500) posts from one category to a new domain. now I have a lot of 404 errors for posts and images. Trying to use Redirection, so I'm on the 404 page, bulk edit select all ...
Will Sher's user avatar
0 votes
0 answers
23 views

Wordpress blog post tags in 2 rows

In the WordPress theme I use, I can usually add 5-6 tags in one blog post. If I add more tags (7, 8, etc...), the tags continue to go under the sidebar, and don't make a second row (what usually the ...
DeeJay's user avatar
  • 1
0 votes
0 answers
8 views

Difficult case to solve - Select + select = result(related data)

Is it possible to do this with a wordpress plugin? I tried to do it with JetEngine using relation metabox and it didn't work because of the filters I need that: select printer (taxonomy for now, ...
Caio Ponte's user avatar
0 votes
1 answer
26 views

Parameter for pagination posts_pagination

I created a pagination with the_posts_pagination() function Right now it looks like this and it works fine: Previous 1 2 3 4 Next When I am on the 1st page, the "prev" button disappears or &...
Thica's user avatar
  • 17
0 votes
1 answer
66 views

How to change post date and post time in Wordpress automatically with a function

I am not much of a coder but I have done research lately on how to change the post date and time in WordPress to the current date and time for all posts and I have not been able to get much. If anyone ...
tee's user avatar
  • 1
0 votes
2 answers
163 views

Change Pages to Post in Woocommerce without Plugin

Whenever I have made a website with Wordpress, the Woocommerce orders are saved as a post. I have several websites where the Woocommerce order page has this url: https://domain.com/wp-admin/edit.php?...
OCHOA's user avatar
  • 101
-1 votes
1 answer
52 views

Display the progress of post achievement with percentage against target in wordpress dashboard

I have a cpt called "movie", and I set a target for writers to make 50,000 posts in 6 months. The question is... can I make a percentage of the results of the number of recent posts against ...
Tuagapat Manam's user avatar
0 votes
0 answers
5 views

Comment section appearing over right hand side of all posts

In the past few days, after navigating to my site (Chemiotics II) a few seconds later comments made to earlier posts appear on the right half hiding the underlying post material. How can I stop this?
luysii's user avatar
  • 1
0 votes
1 answer
88 views

How can I enable checkboxes for custom post type posts on their post list - Wordpress

I have a custom post type called gr-item created by a Wordpress theme. However, checkboxes in Title column for custom post type posts on post list are disabled. How can I enable them? Any quick advice ...
daro2013's user avatar
0 votes
0 answers
18 views

How can I create Woodmart theme "linked variations" through REST API?

I want to create and call linked variables via REST API. Woodmart theme itself has created a post type named "woodmart_woo_lv". And this type of post has three private meta fields named: ...
AminAli's user avatar
1 vote
0 answers
25 views

Post views stopped updating on WP backend posts list [closed]

post views have stopped updating on backend posts list page, no changes were made to core files, or theme updates etc when this happened. Any ideas on debugging this? I have installed a post views ...
1cloud's user avatar
  • 11
1 vote
1 answer
28 views

Get featured image thumbnail and inserting into custom field on wordpress posts

I'm not a developer so trying to put this together has not been successful. Hope someone can assist! My goal - create a custom field on a wordpress post when a post is published or updated which ...
StevieK's user avatar
  • 11
0 votes
0 answers
17 views

How to remove image from starting of wordpress blog post?

When I am selecting feature image for any post of my wordpress blog then unexpectedly a full width image is whowing starting the blog post. If I removing the feature image only then the image is ...
sdipankarmondal's user avatar
0 votes
0 answers
20 views

Can`t attach image to a multiple posts

It seems this question was asked multiple times in the past, but what is the current situation. Is the attachment of an image to a multiple posts possble? Right now when i attach image to more than ...
Konstantin Kurtev's user avatar
0 votes
0 answers
65 views

How to speed up WP_Posts_List_Table __construct() Query on a wordpress website with over 1 million posts?

On a website with over 1 million posts, the following from class WP_Posts_List_Table __construct() is taking a long time: SELECT COUNT( 1 ) FROM wp_posts WHERE post_type = 'shop_order' AND post_status ...
dc09's user avatar
  • 195
1 vote
1 answer
40 views

Change the slug of post type using custom code

How can the default post post type permalink slug be modified to add /blog? Without changing other post types
Hambs's user avatar
  • 11

1
2 3 4 5
121