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).

1,738 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
1answer
1k views

Select only post id and meta value with WP_Query

I'm developing a simple rank plugin, which allows visitors to like the posts and also shows the total like scores for each tag in the plugin's admin page. I need both post IDs (in order to reach the ...
1
vote
1answer
272 views

Insert posts in two tables

Is there a possibility to split the wp_posts table into two tables? I have a huge wp_posts table, so idea is to move the older posts to wp_posts_1 and insert posts only created in the current year ...
1
vote
2answers
2k views

Cannot Update A Post, 404 Error

After months of leaving and deleting my WordPress site, I decided to try again. I downloaded the new version 4.7.3, installed and added a new post. So far so good. I then went back to edit the post ...
1
vote
0answers
26 views

Pulling in post category and children within category

I want to pull in the 5 most recent posts in all of the child categories within one parent category. Below is the code I have so far, but I cant seem to pull in all of the child categories. <ul ...
1
vote
1answer
369 views

How to sort posts inside categories

A weird question from my friend - is it possible in WordPress to sort posts inside categories? Right now the sort order is the default. He shows on specific pages posts from different categories. That'...
1
vote
0answers
24 views

Disable Post/Page comment emails for creators

I have a Wordpress based blog with several admin users, and many pages with comments. There is a main email account set up for all comments to be emailed to. We have noticed that besides the main ...
1
vote
0answers
100 views

External RSS feed to Wordpress Portfolio

I am new to this RSS feed integration to WordPress site. I need some help in Integration part, I have a RSS feed, where I can feed the data and store in a class, and I can create a new Portfolio to ...
1
vote
0answers
85 views

Turn On Comments On Custom Post Types in Directory Theme

I have been trying like crazy to get comments turned on in a directory theme with Custom post types. Their support wont do much of anything but link me here and I've tried what I've found, but its ...
1
vote
0answers
38 views

How To Hide A Post

I have a static front page on my WordPress blog, and currently all posts appear on my designated "posts page". How can I prevent any post appearing on the "posts page" if I so chose? I've looked at ...
1
vote
0answers
36 views

Responsive images with custom image size

In a custom template, i'd like to have the images to be responsive. I'm using the following code to achieve this: wp_get_attachment_image($imageID, $size, false, array( 'class' => 'lazyload image-...
1
vote
1answer
38 views

Making a custom Pagination for multi page blog post

I am building a multi page guide in wordpress and would like to set it up so readers can click on a chapter and be taking that page. I know about the code but i would like my Pagination to appear at ...
1
vote
0answers
74 views

Custom Post Slug same as Parents Category Slug

I have removed /category/ slug in my URLs with Yoast SEO and i have category with parent and child i.e: anime chuunibyou anime info in another case, i have a custom post type with slug anime (same ...
1
vote
0answers
115 views

Shortcode not working with post counter

I am trying to make this a Wordpress shortcode, i mean the below code, but it doesn't seem to work , I included this in my function.php file, but it gave back multiple query result, as seen in the ...
1
vote
0answers
165 views

performance of post_exists

I have a post publish program run like this: if (!post_exists($title)) : $my_post = array( 'post_title'=>$title, 'post_content'=>'my contents', 'post_status'=>'draft', '...
1
vote
0answers
25 views

Chrome + Ad Blocker hides the content of the post

I would like some help with a problem i'm having with my Wordpress Site. Users that have Ad blocker active and the latest version of Chrome seems that they are seeing our posts as blanks. ...
1
vote
0answers
68 views

I get this error message when I try to add a module to a course on my website using Sensei plugin

Catchable fatal error: Object of class WP_Term could not be converted to string in /home/content/p3pnexwpnas01_data02/82/3603982/html/wp-includes/taxonomy.php on line 2287
1
vote
0answers
164 views

Lost draft under all posts and drafts

I'm trying to delete drafts that I've never created. I suppose they are auto drafts. Searched and searched but maybe because it's a super easy fix that no one asks, but can't figure out how to ...
1
vote
0answers
53 views

Can I search posts and pages for css classes?

Background: I'm migrating a fairly large site to a new theme from an old theme and an ancient, messy implementation. I want to remove unnecessary css classes that I no longer use from the content....
1
vote
0answers
29 views

ERROR: Your feed is invalid (after update WP4.7) in custom types

i have created a new custom type “companias” with pods framework plugin , this custom type have this own website with its feed news, and other custom post types i have created. For example “fercam” ...
1
vote
1answer
45 views

Post categories to pages

I'm very ( VERY! ) new to WordPress and I'm having some issues with the following: I created multiple pages like so: and I created categories too: Now how do I assign each post in a category to ...
1
vote
1answer
790 views

Change target of view link in admin

We're developing across two sites. One site holds our content, the other actually displays it. So when we are viewing posts in the WP admin, the View link is pointing to the instance it's on, which ...
1
vote
0answers
609 views

Changing default 'posts' parameters with register_post_type_args

everyone! I'm having trouble trying to update WordPress core 'post' registered arguments to improve a functionality in my website. Specifically, I want to be able to have a hierarchy between my posts ...
1
vote
1answer
180 views

Switch to page template when using post permalink

I'm new to wordpress development so hopefully I'm asking this right. The company I work for recently bought a custom wordpress site from an agency, but before we were able to launch it, the agency ...
1
vote
0answers
32 views

Admin Column does not populate with data

I am new to coding and struggle with the following code. My plan was to add a column to the admin page of a post list. I managed to add the column but struggle with adding the relevant data. Here is ...
1
vote
0answers
55 views

minimum requirement to add posts via database

I have a theme with a custom post type that is a business listing. I need to import a pack of business listings. I have written sql that adds the data to wp_posts and wp_postmeta. When I run my ...
1
vote
2answers
61 views

Delete and perform a fresh install of WordPress

I have a blog page on my site, and after several people tried to help fix a problem it has gotten to the point that I get a lot of errors. I am looking to delete my blog I reinstall it again, ...
1
vote
1answer
213 views

How to have posts have a parent in permalink like site.com/blog/postname

I have a site that I'm working on and I want to have a custom blog page. Unfortunately if I use Settings>Reading to set the blog page it clears out my custom blog page. Since I can't set the blog ...
1
vote
2answers
766 views

Get user categories with most posts in it

I am trying to make a query to take first 3 categories with most posts per user, but no luck so far. This is where I am now: SELECT DISTINCT(terms.term_id) as term_ID, terms.name, terms.slug, posts....
1
vote
1answer
28 views

How not display particular post?

Ex: In my field "POSTS" I have 10 posts. Let's say I do not want to display the post "8", which has the ID (looking in the URL) "155". How can I do to not display this post on my home page? I want to ...
1
vote
0answers
121 views

One menu for frontpage (one pager), and a different menu for posts

(TLDR version at the end) I have set up a website for a company who wanted a "one page" website. This is delievered and done. My main menu consists purely of #anchor tags. They have now started ...
1
vote
2answers
80 views

How do I display some posts fully on the homepage, and some as an excerpt only?

I would like to tick a box while drafting a post which will determine whether: a) only the excerpt for the post is shown on the homepage, linking you to the full post by clicking 'read more' or b)...
1
vote
1answer
674 views

How to bulk add vast amounts of posts

I'm looking for a way to automatically add a large number of example posts to a WordPress blog for testing purposes. I have the requirement to test a bulk process on 15,000 English blog posts (one or ...
1
vote
0answers
129 views

pagination for single post by category

I want number pagination for single post type by post category on my custom page template, I know about next previous function but i want number pagination in my custom post page. <?php // ...
1
vote
1answer
44 views

Unable to restore from backup - how to obtain old blog posts?

A little back story for context: I was brought in to help fix an issue with a WordPress Theme Update & Migration gone horribly wrong. Long story short, when the guy that did the move finished the ...
1
vote
1answer
82 views

Post Loop Missing Most Recent Post

I could use some help with a post loop that seems to always be missing the most recent post. I'm guessing that my loop is somehow buggy. My code is below. Any help is appreciated! <?php $posts = ...
1
vote
0answers
48 views

Trying to fix form resubmition with PRG (Getting error: Cannot modify header information - headers already sent by)

I'm developing WordPress plugin which has POST form and I'm trying to fix the well-known bug - resubmission. I chose the method PRG (Post/Redirect/Get). I created separate file called process.php ...
1
vote
1answer
35 views

Post page to display specific category

Here is the template code <?php /** * The template used for Home page */ ?> <section id="mosaicPosts"> <!-- MosaicPost--> <div id="mosaicTiles" class="clearfix"> <?php ...
1
vote
1answer
54 views

Show only one page link in content pagination

Im currently using the wp_link_pages tag to show the pagination links for content that is split inside the Post. Is there a way to show only the next page link and not all page number links or not ...
1
vote
0answers
582 views

How to integrate a form (Ninja Form or Contact Form 7) with Custom Post Types?

I am creating a website where organizers can come and post their events. Data will be accepted via a form and when the user submits the form, the data must be utilized to create a custom post that ...
1
vote
0answers
62 views

remove post that has no content

Code below display posts now I only want to display the items if it has a <?php echo c2c_get_custom('Gallery'); ?> on it. <ul id="gallery-container"> <?php ...
1
vote
1answer
324 views

Include sticky posts on the static page front page

I have a static front page that lists out news. Right now, it ignores the stickiness of a post, and justs lists it. I want it to work the same way as my blog posts page does. I want it to list out all ...
1
vote
0answers
116 views

Transferring WordPress Database - Serialised data

I'm attempting to migrate data that is using a plugin (WordPress Job Board) to a new instance of a plugin (WordPress Job Manager). The plugins are storing data differently in certain parts of the data....
1
vote
0answers
449 views

Loading <!--nextpage--> post with Ajax

Here's the case I got: I've setup post pagination for my website and everything works well. Except one thing - on every new page request all the resources are loaded again. This makes the website ...
1
vote
0answers
1k views

Posts and Attachments with “Published” status in Search

I would like the search to show only published posts and attachments (the attachments are photographs taken directly from the media library). The trouble is, when I specify that the post_status must ...
1
vote
0answers
368 views

Get attachments for posts that belongs to a specific category

I am trying to get images which are used by a post belonging to the specific category. For example if I have plants, mushrooms and animals as post categories, I only need to retrieve images that are ...
1
vote
0answers
98 views

why are images not full size?

when viewing images on portfolio page is not a problem, but if one portfolio in the open drawing that appears small, it requires some time so the image can be full size. Why did it happen,can you ...
1
vote
0answers
15 views

Prevent additional top level categories but allow more children

Is it possible to prevent additional parent categories being added to posts but allow children categories to be added to predefined parent categories? For e.g.; Food & Drink -- Mexican -- ...
1
vote
1answer
58 views

Need help with category listing!

I'm trying to solve this for a while, but I couldn't get a satisfactory way to get what I want. Maybe it's very simple and I'm just too inexperienced. I need a way to display all the article titles ...
1
vote
0answers
67 views

Emojis replaced by '?' automatically

I just discovered that all emojis on my site were replaced by the ? char. I saw this on comments and posts. Tables like wp_comments or wp_posts had a utf8mb4_unicode_ci collation before and now, so ...
1
vote
1answer
35 views

Post body text occupying featured image space before it loads

I am wondering if there is a way to prevent my posts body text to occupy my featured images space before it gets loaded. When I go to some post the post content is right bellow my post title until ...

1
3 4
5
6 7
35