A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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
0answers
7 views

Image Gallery photos aren't cropping, even though they're set to crop

Can someone help??? I know I'm uploading relatively high-res photos, and yet they're still not filling the frames of the image gallery I'm creating in the post. I've set the switch to "Crop" in the ...
0
votes
0answers
7 views

Contributor edits published post and sends for review - post is made private?

We recently upgrading from WordPress 4.9 to WordPress 5.3 with the new Gutenberg editor. Previously, I could publish a post, a contributor may make a post-publish edit which doesn't immediately ...
0
votes
0answers
16 views

Posts order in grid

In my theme I have a grid which shows featured posts. This one I really like, but posts order in it are not as I like: https://i.imgur.com/GzGwRXl.jpg On the photo from link above you can see in red ...
0
votes
1answer
18 views

WordPress recent post

I have the static website template on the following domain : example.com and I have wordpress site in the sub domain : sub.example.com I want a code to get the latest post ( just post title ) from ...
0
votes
0answers
25 views

Why does my “Add New Post” page have an old post in it?

I created a brand new WordPress site. I imported the export *.xml from my old site. Now, when I go to "Add New Post", there is an old post in there, and I can't seem to do anything without getting ...
0
votes
0answers
15 views

Redirection to another page or post when deleting or moving to trash post in wordpress

I'm looking a way or plugin which give me functionality to removing post to another post. I see this like when I delete post, popup with input will shows and I will be type a URL. This URL will save ...
0
votes
0answers
52 views

I can no longer post or even save a draft, getting the error “A post type mismatch has been detected.”

I'm not a WordPress developer -- just a guy trying to keep things updated and writing blog posts. If I try to publish or save the draft of a new post, I get: A post type mismatch has been detected....
0
votes
1answer
10 views

link to edit a post has empty target

I open the admin dashboard and navigate to "Posts" I see the normal list of my posts On some post I can click and the editor opens (everything is normal) BUT: On some post the link, which should be ...
1
vote
0answers
8 views

Display by Category in Admin

I run a website that has different online courses. Each course is a post. Each category is a state in which the course is approved. The states change every few months. I am given a document that lists ...
0
votes
1answer
29 views

Add CSS and JS files of the template post on a WordPress page

Out of necessity I should add all the CSS and JS files present in any WordPress article on a specific page through code. Do you know how to add all these files? If I try through the normal ...
1
vote
0answers
18 views

Stop users posting into category while still seeing contents of the category

I have been hunting this for days without success. I have many categories which users are free to post articles into, but there is one category I want to restrict to a specific role. My Wordpress ...
0
votes
0answers
17 views

Pagination Stops

I noticed pagination stops working after page 10 of blog posts. When on page 10, and clicking the right arrow/next button button you are taken back to page 2 instead of page 11. I have read several ...
0
votes
1answer
18 views

Accessing post's meta data based on user's click of a post

I am displaying a gallery of custom post types. When the user clicks a post, instead of redirecting to a single template, I want it to redirect to another page (too easy just change the link since all ...
0
votes
1answer
21 views

Why does a published post only displays the title and not the content in the site? [closed]

I published a post last January 3 and it went out fine. Now, I published a post again but the site only displays the title and not the content. This is the first time that this happened to me. Do you ...
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
21 views

count total number of post using a particular image

i would like to know how many posts are using a particular image. But the only way i found is checking every post_content in the wp_posts table and looking if the image is used in there. is there a ...
0
votes
0answers
23 views

WordPress: Develop multiple posts with different data

I have a landing page of multiple books as a post, I want to display each book in separated post, in each post has a book name,download link,image and size. All books posts has same design with ...
0
votes
0answers
18 views

How to display custom search results from a selected category of a custom post type?

I have a website that has a blog and a custom post type called proyecto. They are on mywebpage.com/blog and mywebpage.com/portafolio.Each of those pages have a search field and category dropdown ...
0
votes
0answers
10 views

Nestling Posts Under Page & Justify Text

I've recently come returned to blogging. I'm currently using Wordpress and I have a few personal initiatives. For the life of me I can't figure out how to have some posts go in one of the initiatives, ...
0
votes
0answers
30 views

add tags to wordpress post using REST API

I'm new to WordPress programming and I'm trying to connect to WordPress REST API and send a new post with content and many tags. I can connect to API and send a new post but I can't add tags to those ...
0
votes
0answers
17 views

Unique posts on one page

on my home page I have 4 posts selected by tag in slider as featured posts. Below that I have some widgets which displays posts from selected category. How can I make category widget not to show ...
0
votes
0answers
25 views

Split post template in two pages

I need to split my single post template in two pages using pagination . It's very simple in post editor by <!--nextpage--> But i want to do it in single.php file So the page content in first ...
1
vote
0answers
16 views

Anyway to grab author name and featured image in an embeded in inital array of posts outside of loop?

Here's how I'm doing it atm. $query_vars['paged'] = $_GET['page']; $query_vars['posts_per_page'] = $_GET['posts_per_page']; $query_vars['post_status'] = 'publish'; $query = new WP_Query( $query_vars ...
0
votes
0answers
11 views

Post content is escaped when visual editor is turned off

When visual editor is turned off, then $post->post_content is escaped. With visual editor turned on, the exact post content is obtained as saved. When visual editor is ON, output of $post->...
0
votes
0answers
18 views

How to make 'show_option_all', that comes from wp_list_categoreis, to work with get_categories or with get_terms?

My problem is that I want to make an ajax category filter, where it shows the categories, but also to have a button "all Posts" so the user can go back to viewing all posts. My current code is using ...
-1
votes
1answer
16 views

Static page with formatted post list

I'd be surprised if this doesn't get asked a lot, but I did a quick search and couldn't find an answer so... I have a couple of Wordpress sites and in both cases I really want to have pages comprised ...
1
vote
1answer
28 views

Second transition_post_status hook fired instead of the first

I'm using transition_post_status to move a post into another post type based on the $new_status, I had made two hooks but the second one always firing first even though the $new_status is 'publish'. I ...
0
votes
1answer
28 views

How to populate a select field with post titles/ids in a block

I need to build a really simple block with just one select field. This select field should be populated with the titles/ids of posts of a specific post type. Once a user selects one post from this ...
0
votes
0answers
11 views

Filter post by category with pagination

Hi i want to display all categories on frontend as a checkbox and filter the blog post based on checkbox selected with pagination , any help please
0
votes
0answers
31 views

Wordpress Recent Post with the badge “New” on the side of the title post

I'd like to greet everyone a Happy New Year and Happy Holidays. I have a request on how to put a label "New" beside the title post on my recent post and my single recent post(red Mark in the photo). I ...
0
votes
1answer
12 views

Bulk find & replace on Wordpress posts/pages (minus image paths)

I'm dealing with a tricky issue and wondering if anyone has a good way to solve this. I am trying to change everything on my Wordpress site that has "2019" in my posts/pages with "2020", however when ...
0
votes
0answers
10 views

Redirect to custom post if custom archive page has just one result?

So i have made a Custom Post Type called cars and 4 taxonomies that i use to make/edit the cars pages. I have a search&filter pro plug-in to help me sort my pages by the 4 taxonomies assigned. It ...
0
votes
0answers
37 views

Unable to delete attached file from folder programmatically

I am unable to delete attached files from their folders programmatically or even through the wordpress admin as the admin user. The attachment record deletes from the database but the file remains in ...
0
votes
0answers
5 views

Custom block - check if post exists

I have custom block with saved attr of post ID. How can I verify from block definition that post with that ID exists in Wordpres. My aim is to warn user if post with saved ID exists no more.
0
votes
1answer
38 views

Is it possible to add a shortcode below post title?

I have a shortcode that I want to place below title of all my posts. Is there a hook or a filter I can use for this?
0
votes
1answer
23 views

How can get the last post date of the user?

I want to get the last post date was written by the user and here's the code that I have made but it's not working: function get_user_last_post_date( $user_id ) { $args = array( '...
0
votes
0answers
12 views

How to display links to the previous and next post in the category?

How to loop the output of posts when I click on the "Forward" or "Back" buttons so that there is a transition in the same category as the previous post. And now, when posts of a certain category end, ...
-1
votes
1answer
25 views

How can I get the first post THIS SAME CATEGORY?

How can I get the first post THIS SAME CATEGORY? It's just that now he takes the very first post that is generally in this type, but it is necessary that he takes the first post in the same category ...
0
votes
0answers
19 views

Posts are not displaying on their category and tag page

I created a post and assigned it a category and tag also. The post is displaying on the main post page. But the problem is when I go to the specific category page the post is not showing. For ...
-1
votes
0answers
33 views

wordpress new post overwrites the prior post

I have a big problem in adding new posts.When i want to add new post it is possible but it overwrite on last post and it does not exist. in local i do not have this problem. pleaze help me
0
votes
0answers
20 views

How to convert attachment pages to Posts?

I have mp3 files as attachments, I would like to have each attachment page considered as posts, Is it even possible?. Are there plugins that does it?. Importantly, I need to use the id3v2 tags of the ...
1
vote
0answers
17 views

use wpml_post_language_details function other plugin based on $post->ID [closed]

I would like to use wpml_post_language_details function in other plugin based on $post->ID of WP. WPML language plugin wants to use for fetching lang information. I also wonder if i can use ...
0
votes
1answer
36 views

Tag for custom post type

I have several post type (animal, science, car), I want all these posts type to use the same Wordpress default tag. exemple of car post type : // custom post type add_action( 'init', '...
0
votes
1answer
20 views

What is $post->pre_post_content exactly?

We have an issue with getting updated data for editing from one of our posts in our site and i found this piece of code to get the content of the post $post->pre_post_content instead of something ...
0
votes
0answers
30 views

can not get query to display post count by month of current custom taxonomy in custom taxonomy page

I am trying to display post count by month of current custom taxonomy in custom taxonomy page. but it display total count by month <?php $post_type = "sikayet"; $posts = get_queried_object()->...
1
vote
1answer
62 views

Search not working with title and content

I am working on search. I am able to search post by tag and category but not able to search by title and content. I tried below code but it's not working. Would you help me out? $getSearch = ...
1
vote
4answers
43 views

Show Two custom Post type and their posts on category page

I have Two Custom Post Types "Article " & "News" and they both use same categories like [ audit , income , tax] . I want when i open audit category page then the post showsn like below: the code ...
1
vote
2answers
32 views

Multisite - Get current post id

I'm using WPMU in my project, but I'm facing some problems to get the current post id from all sites. If I run this code, I receive the same post id of current site and not the different post id from ...
1
vote
1answer
19 views

Update all comments time to random dates?

I found this code snippet which randomly changes all the dates for all posts. (Original Post : Update existing post dates to random dates ) <?php /** * Plugin Name: WPSE 259750 Random Dates * ...
3
votes
2answers
32 views

How To Ignore a Filter On Applying Filter the Content In a Function

I am having a filter for the content that adds a Table of Contents at the top of my posts. I took the basic idea from an answer at Stack Exchange itself. I add the filter as follows: add_filter('...