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

learn more… | top users | synonyms (2)

1
vote
1answer
15 views

Storing posts from query and accessing later via AJAX call

To clarify the above question title, what I am trying to do is create a grid of posts, for which I am displaying a thumbnail of an image that is attached to that post. Then, upon clicking each of ...
1
vote
1answer
17 views

Edit meta data does't work with custom sql

I have a form that uploads posts to Wordpress, and at the same time I can edit things like the meta data afterwards. However using the Wordpress edit_post_data works fine but a custom SQL query won't ...
0
votes
0answers
11 views

add post type support not showing edit author options for all users

Need to allow all users (admins) to be able to edit the authors of a post. Added this to my wp-admin.php in the inc/functions folder but is hasn't worked: add_action( 'init', ...
1
vote
0answers
16 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 ...
-4
votes
2answers
27 views

How to var dump urls for all posts

I need to see all urls of all publish blog posts in the site. How can I get this? I want this for redirecting in .htaccess of old site to new site. This needed in anything page of site.The result is ...
0
votes
0answers
7 views

Subpage for custom post type not beeing loaded

A week ago I started working with wordpress. My project is to expand a friends website with a section where she can add offers (e.g. guided hiking tours) in a chronical way. Those offers should have ...
1
vote
0answers
11 views

How to create new post content templates for my users?

I admin a wordpress site for my kids primary school. At the number of editors/contributors is small, but we'd like to expand it. To simplify the uptake for some of the office staff I'd like to have ...
0
votes
2answers
35 views

the_content() stop images being pulled through

I have created a custom post type to pull through the date, title, thumbnail and content, some of the posts have images and the_content() is pulling through those images and I don't know how to stop ...
0
votes
0answers
19 views

Hooking to APIs working on WP_Posts

I'm working on a WP site, and I've found a plugin that I can use to do most of the work. But there is a problem: as I feared, it stores all of its data inside WP_Post. This is obviously pretty stupid ...
0
votes
1answer
21 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 ...
0
votes
1answer
28 views

How to get post content by calling ajax?

I am working on a plugin .I have a custom post type team.Custom post has four posts of different categories.I used this code to send post id of each using ajax. $(document).ready(function () { ...
1
vote
0answers
18 views

Random ajax load only works with posts_per_page set to -1

I created a post loader shortcode, that uses AJAX to load posts. Even though I can set the order and order_by query parameters, the order_by should be random. From what I've seen on the web, ajax load ...
0
votes
1answer
18 views

Disable auto-save and post revisions from inside a theme or plugin

Per default, the way to disable autosaving and post revisions, is to modify wp-config.php. Is there a way, to do that from within a plugin or a themes functions.php?
0
votes
0answers
13 views

How to recreate post form on a custom PHP page.

I need to have my users be able to post pages on a custom php page, not through the standard Wordpress menu. Therefor i'm trying to recreate a form that can post just like the Wordpress 'add post' ...
0
votes
0answers
18 views

What is the use of the URLs stored in the posts table

When a user adds a post in a WordPress site, the link of that post is stores in the database in wp_posts table. And if I changed the link in the database it doesn't actually change in real. For ...
1
vote
1answer
26 views

Articles are text-only in any “Category” instead of HTML

I run a Wordpress blog at http://toile.reinom.com/ and a lot of articles are using HTML codes (mainly <h*>, <p>, <a> and <figure>). Those tags are correctly displayed on the ...
0
votes
0answers
10 views

dynamic table for post?

I want to display a list of items with pictures and a short description in a table on a wordpress page. The problem is that I want to the main future editor to be able to add new items at the start ...
0
votes
1answer
23 views

Display one post randomly from category on home page

I have a custom post type called "Milo-Books" and a category named "Featured" with ID of "100". I want to run a query which pulls out on post from this category on the homepage, but randomly and I ...
1
vote
0answers
18 views

Prioritize posts in query by meta keys?

I have a CPT called jobs. In my single jobs page I am counting page views with these functions: /********* Post Views counter ***********/ remove_action( 'wp_head', ...
1
vote
0answers
18 views

What's the best way to render Visual Composer in posts, not pages?

I have a page with layout and ui content I'd love to use in my posts. Is that possible without running through all the shortcodes with do_shortcode?
2
votes
0answers
18 views

Double count view in archive.php

I'm having a hard time using this snippet I'm getting double views each time the post is queried. This is in my functions.php file: function getPostViews($postID){ $count_key = ...
1
vote
0answers
12 views

Homepage's content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?

I have a custom field in my home page called "Featured posts". There are two fields: title and post. The post field returns post_object with post_type as posts. In my functions.php I have added the ...
-2
votes
0answers
21 views

Create Child Post of Parent Post [closed]

I want to create and show a custom post type. With a parent post and with a few child posts as well. How can I do this? Any help appreciated, thanks!
1
vote
2answers
27 views

Append Text to $post->post_excerpt

I'm trying to add some text after a product description in WooCommerce which uses the $post->post_excerpt. Currently I'm using the following code: add_action( ...
2
votes
0answers
22 views

How to moderate posts

I am writing a plugin that will moderate all posts regardless of what level user posted them. It will check the post content and title against a list of words and if any are in the post, I want to put ...
1
vote
1answer
32 views

Static page does not show my posts

I have a home.php and an index.php. Wanting my home.php (set as static) to display 3 grid style showing 3 posts. This is my current code. <?php // The Query $the_query = new WP_Query( ...
1
vote
1answer
24 views

If post has custom field then display css-class

I would like to display a different icon in an i tag if a post has a certain key of a customized field. In my example Preis: <i class="(get_post_meta(get_the_ID(), 'Preis', true) != '' ? echo "fa ...
1
vote
1answer
57 views

Limit posts per author role (excluding admin) in home page

I have multiple authors in my site and want to show just one, the latest post from each one, excluding the administrators. So, if for example: admin1 has posted 4 posts admin2 posted 3 posts ...
1
vote
0answers
21 views

MySql query to get posts with all meta and terms

I'm trying to figureout a way to get all fields from wp_post with all of their custom fields and categories in one mysql query. So in one row of the result I should have post fields with their custom ...
1
vote
0answers
27 views

Trying to use AngularJS with WordPress without any API

I understand one can do this using the JSON RESTful API from WP but I don't want to go that route since it only works with sites on Wordpress.com and not on localhost (at least that's what I was told ...
4
votes
1answer
28 views

Let private posts stay in status “private” after edit through “editors”

I'm using some private posts for intern purposes. When an editor changes something on these posts, its status turns to pending "review" and I have to publish it again as a private post. When an ...
0
votes
2answers
41 views

Post to WordPress from another Server via PHP

I have running a wordpress site on - lets say - "site.com" and another site "input.com" hosted in completely different locations. As the name suggests, "input.com" should be used as a input site with ...
0
votes
0answers
22 views

Lazy loading Ajax offset not working

I am attempting to create a lazy loading ajax feature on my site. There is a 'click more' button which will then load 10 posts via ajax and append them to the HTML container. I want to display 10 ...
1
vote
1answer
22 views

Get posts by name and taxonomy term

How do I get all posts that has a taxonomy term and a specific name/slug? I have tried with the following arguments but without getting the wanted result. What am I missing, how can I combine the ...
0
votes
1answer
9 views

Get posts associated with media attachment

Is there a good way to find all posts that contain a specific image? I'm working on the attachment single template, and I'd like to list the posts that contain that image.
0
votes
0answers
35 views

Contact Form 7 - redirect with variable | Google Analyitcs

This is the case: I have 10 courses on my website with a contact form where they can subscribe to the course. There is one contact form for all courses. When they subscribe now they just get a ...
0
votes
1answer
19 views

How to have one page show posts reverse-chronologically, but the others chronologically?

I have a project-log type website where I store all of my progress on my projects. I want my home page to display all of my posts reverse-chronologically (so the visitors can see the newest pages ...
0
votes
1answer
21 views

Embed image in post from external url

Is there a way in Wordpress that I can embed an image to a post when I want to include it like this: <img src="....." /> So I want to add this manually. Is this possible? Now, I get the URL, ...
0
votes
0answers
25 views

Random post works only for authenticated users?

My code in a file .php: <?php /** * Template Name: Random Post * * This is the template for random posts * * @package activello */ get_header(); ?> <h1 ...
0
votes
1answer
59 views

Retrieve post in AJAX Callback

I have a JS file that triggers a PHP callback file. The PHP file is supposed to work on the Post that is currently opened (wp-admin/post.php). I do not want the JS file to pass the post id though ...
0
votes
1answer
16 views

post_name is not stored until post is published… where should I store my slug until it goes live then?

important try as normal contributor user, not as admin see here I actually have it reproduced. Seems like a bug to me but whatever. I want users to choose their slug. Well, as you cannot store ...
2
votes
1answer
78 views

Code Blocks with WYSIWYG in blog post

Is it possible to format code in the wysiwyg editor, up to now I use Blockquotes to represent code, but my problem is that it does automatically line breaks, and I don't want to have random line ...
0
votes
1answer
17 views

List of authors posts minus very latest

I'm creating an authors.php page to display all the posts for the author clicked. But the list(s) needs to show the very first / latest post so I can style it diferently than the rest of the posts? ...
0
votes
1answer
35 views

Changing next and previous post link text

So I've been staring at the CodeX for about 10 minutes and can still not figure how to do this next and previous on a the post page. So I've added <?php next_post_link(); ?> and <?php ...
0
votes
0answers
21 views

Blog only showing one post even though more published

Why is my wordpress blog.php only showing one blog entry while I have two entrys in the blog at present and have checked both are published and they are and yes i do have my reading setup to my blog ...
1
vote
0answers
23 views

Prepending %category% onto default posts fails

I have been attempting to change the rewrite slug on the default posts. This is my post_type re-registering code (Taken from another post on StackOverflow) with the simple intent of changing the ...
0
votes
3answers
96 views

How to Mysql select a list of posts with meta_values AND all relevant categories?

I am trying to produce a list of posts and display a report which shows both some meta_values for each post, but also a list of all categories to which each post is attached. I am using the nifty ...
0
votes
1answer
26 views

How to get the postID inside 'content_save_pre'? Other hook?

I need to get the current PostID. I think in the function the postID is not existing yet. (Because save pre ...) add_filter('content_save_pre', 'getImageUrlOutOfContent', 10, 1); Am I right? How I ...
0
votes
0answers
15 views

Show posts with Ajax by category

In a custom post type (profile), I have categories (state 1 , state 2 , state 3) in a dropdown list. How can I show posts to select, and with any state change, then show posts by selected category ...
0
votes
1answer
25 views

Adding divs to WordPress page content

I am wondering if there is a way to add divs to specific elements in the WordPress page content? For example, I would want to wrap a div around content starting at a H2 element and ending after an ...