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)

0
votes
2answers
49 views

How do I change the core post search algorithm? Where is it found/constructed?

I have wordpress and woocommerce installed and I noticed that woocommerce's product search seems to use wordpress's search. Well, I don't like the search, and I'd rather alter it at the core rather ...
0
votes
1answer
34 views

Index.php is ordering posts strangely

Index.php has the loop and I'm adding HTML at intervals, but when I preview the post list page, the order is incorrect. I've tried a different loop, and I've also tried query_posts & without, but ...
1
vote
2answers
67 views

Get only modified posts

I'm using this code for generating a Feed from lasted modified post mysqli_query( $conn, "SELECT * FROM wp_posts WHERE post_status = 'publish' AND post_type = 'post' ...
0
votes
0answers
16 views

Metabox values are empty on POST

I've created a metabox for my custom posttype for a shopping plugin. But right now I have some troubles saving the data. This is my metabox view: function wpt_products_price() { global $post; ...
0
votes
2answers
41 views

Custom Post Type doesn't use single.php or single-{custom_post_type}.php

I tried to set up a custom post type in Wordpress, and everything worked just fine. Until displaying a single post from my custom post type. First it didn't automatically use the single.php (as it ...
1
vote
2answers
32 views

Best practice for migration friendly images in posts/pages?

So I'm developing my sit in a WAMP environment with URL http://localhost:8080/wp1/ with the eventual plan to migrate it to live on the interwebs. I just noticed in my pages when I upload the images, ...
0
votes
0answers
21 views

get backup file from wordpress database in x days

I have a wordpress website with so many posts and custom fields located in meta table. What I have to do is to make backup from each 30 days (for posts and postsmeta table) and append it to my last ...
1
vote
1answer
53 views

Count posts in category including child categories

I have found this code somewhere, it counts posts but only which are under specific category. I would appreciate if someone could expand this so it would count all posts which also belong to its child ...
0
votes
1answer
29 views

Post visibility based on user role

How can I make it so that new posts will be automatically private, except visible to other users which have the same user role as the post author?
0
votes
0answers
12 views

Wordpress field group post

I am trying to pull images from a field group I created in Wordpress. First I created a new field group. I then created a new row with the name: witb-icons and field type: loop. Then I created a new ...
1
vote
1answer
38 views

Modify Image Source With The_Content Filter?

I'm very inexperienced with regex, however I'm trying to create a function that filters through the_content() and get_the_content() in order to modify the SRC of all images. The intended purpose ...
0
votes
0answers
18 views

How to let users “follow/subscribe” tags (part is working)

I've searched for this for a looong time; My users should be able to follow/subscribe a tag than on a second front page, they only get posts from the subscribed tags. In the following example, in the ...
1
vote
1answer
27 views

How to permanently delete a post meta entry?

delete_post_meta seems to merely clear out the value for a given post meta key. It doesn't really completely delete the row. I've been digging a lot, but I can't seem to find any function out there ...
0
votes
2answers
27 views

How can I schedule a PAGE to go live at a future date/time?

I have no problem scheduling posts to go live at a future date/time, but last year, when I launched my site, it crashed when I tried scheduling a static page to go live (specifically, I believe it ...
0
votes
1answer
27 views

How to change number of posts shown on homepage vs other pages?

I tried using this function but my homepage (which is the latest posts, not static) shows 5 posts -- the else. function limit_posts_per_page() { if ( is_front_page() || is_home() ) return 1; ...
0
votes
0answers
17 views

Move only new blog posts to sub directory?

Currently my blog posts are not under a sub directory : www.example.com/blogpost1 www.example.com/blogpost2 etc.. Going forward I want all blog posts to be: www.example.com/blog/blogpost3 ...
0
votes
1answer
65 views

How To Loop Through <li> list with Custom Post Types

Please excuse me for being ignorant. I am currently trying to learn more about PHP and WordPress. This is my first time to post a question on StackExchange. I found a jQuery plugin for a simple ...
0
votes
1answer
21 views

Template code to split a post and print a custom field?

So I want a blog post but in the center of every blog post I want to split the content and print a custom field attached to the blog post type. Ie you field called "Blog Quote" and the user will ...
0
votes
1answer
42 views

Show number of posts by logged in user

How to display the number of posts written by the logged in user. Here is what i got from the codex so far <?php echo 'Number of posts published by user: ' . count_user_posts( 5 ); ?>
0
votes
0answers
15 views

How to reorganize the items in post editor page (wp-admin/post-new.php)?

How do I reorganize the menus or items in the post editing page (wp-admin/post-new.php). For example, I want the publishing box to be move to the bottom and have the category box to be on the top. ...
1
vote
2answers
57 views

WP_Query Authors OR Categories

I'm trying to create a feed where posts are pulled based off a set of authors, OR a set of categories, but I haven't had much luck. I've tried using meta_query and tax_query, but neither worked. ...
0
votes
0answers
18 views

Custom Query Problem

I want to get posts specified with just parent category, not with childs of it. But when I'm using category property, posts_per_page not working. If I remove category proerty, posts_per_page working. ...
0
votes
0answers
28 views

Only display the subcategory posts in the category page

I have worked with WordPress for a few years and never encountered such case where I need to display posts published under the sub categories of the parent category without parent's post or grand ...
0
votes
1answer
22 views

Posts in Admin only display 1 Post instead of all

When I run wp-admin/edit.php I normally should get a list of all Posts. WordPress 4.3.1 running Avada Child theme. But I only get the last Post in the list. All (8) | Published (7) | Draft (1) As ...
0
votes
0answers
38 views

Display custom posts under category and sub-category

I want to display all posts under child, Sub Child 1 and 2. Let's say we have 3 posts, 2 of them are under Sub Child 1 and last one is under Sub Child 2. I only want the 2 posts that are under Sub ...
0
votes
0answers
17 views

Disable archiving of old posts?

I need to disable archiving. We want to have all posts, no matter how old, remain in the roll with the newer posts even if you have to page back to get to them. I've been searching, and most of what ...
0
votes
1answer
30 views

Exclude sub sub categories from displaying in the archive page

I have the following category structure: Category x >> Category x Sub >> Category x Sub Sub In my index.php file, I have created links to category x and so on. So when the user ...
0
votes
1answer
27 views

Customizing individual images on posts

So I'm trying to customize the output of single image in my posts, adding custom divs and classes. I found a good tutorial online here - How to wrap every image in a post with a div? The function ...
0
votes
0answers
14 views

Making sure to always display posts from three different authors

Say I want to display nine posts on my homepage, and have 3 authors on the blog. Using WP_Query or a similar method, Is it possible to make sure that at least 1 or 2 posts from each author is ...
0
votes
0answers
19 views

How to : pagination in 3 different custom loops on the same page

I have this content in my index.php. 3 areas with 3 distinct custop wp_query loops to get different categories of articles in each one. I have set wordpress to show 12 articles by page, so it displays ...
0
votes
0answers
8 views

Different number of posts on different browsers and different language

I have ordinary WP_Query with featured posts and plugin Polylang, the problem is that different number of posts that is defined is showed in different language and I've noticed in different browsers ...
0
votes
2answers
26 views

Post are not showing up

The site I am working on is skinnnybantonmusic.com The Lastest News page is suppost to show the blog posts but for some reason none are showing up. (http://www.skinnybantonmusic.com/latest-news/) ...
0
votes
1answer
21 views

Parsing Menu Items and Blog Posts

Question 1 I'd like to be able to show or hide certain pages in the main navigation menu based on whether or not they have certain prefixes in their title. This is mostly for the purpose of language ...
0
votes
0answers
9 views

Search within a very long post that has been splitted into pages

I'm looking for a plugin or a hack that'll allow you to search within a very long post. I know you can already ctrl+f on any browser and look for the words you're looking for, but what if the post has ...
0
votes
0answers
27 views

Prevent scheduled post being published if date/time is past current date/time

I'm looking for a function at prevents a scheduled post being published/updated (with a popup warning or text next to the publish button) if the post's date/time is equal to or less than the current ...
0
votes
1answer
22 views

'posts_per_page' in costum page type

i have a problem with the 'posts_per_page'- no matter that i set it to, e.g 10 or 0, it always only show one post! <?php $loop = new WP_Query( array( 'post_type' => 'producenter', ...
0
votes
0answers
14 views

How to get all the posts to a image (media)?

I would like to fetch all the posts in which a particular image is used. Lets say image_xya.jpg is attached in following articles- Article 1 Article 2 Article 3 Now I would like to display all ...
0
votes
1answer
30 views

Posts are printed twice

I am trying to fetch posts in bootstrap accordion like this <div class="container"> <div class="panel-group" id="accordion"> <?php if ( have_posts() ) : ...
0
votes
1answer
22 views

Can I change a post to a page by changing it's type?

I'm looking at the properties of the $post object and there is a "type" property. In the code if I write it out it says, "post". If I change this to "page" will it show up as a page? I can try it but ...
0
votes
2answers
28 views

Add few specific post ids to wp_query

I have following args to get recent posts, $args = array( 'date_query' => array( array( 'after' => '1 week ago' ) ), 'posts_per_page' => 15, 'ignore_sticky_posts' => 1, ...
0
votes
0answers
38 views

post_permalink not leading to individual posts, but most recent post

I've set up the main blog page, and I put this for the link leading to the full post: echo post_permalink( $ID ); This shows up correctly as a link, but the title and content are my most recent ...
0
votes
0answers
27 views

show posts in two columns with different template parts

i tried to show the posts of a category in two columns on a page. Normally i do that only with CSS respectively bootstrap columns. But in this case, i need for each column a own template part. In the ...
3
votes
1answer
124 views

How do I detach images from posts?

Firstly I've seen some topics like this, but they haven't helped me. I've attached some images to a post via "Add Media" : And for showing these attached images, I used following code in ...
0
votes
0answers
15 views

How do I display continuous loop of multiple (4) previous adjacent posts while viewing the current post

I found a great article that enables me to display previous 4 adjacent posts here: Getting the Next and Previous Posts Titles in the Sidebar? @sorich87's explanation works great for me on my website. ...
0
votes
2answers
22 views

Hide a specific post from a page template

I am trying to hide a specific post from a page template? Does anyone have experience with this, would prefer to not have to use a plugin. Was thinking of using wp_post ID but am unsure of how to go ...
0
votes
3answers
46 views

How to get all post except one post from a custom post type?

I had created a custom post type named rooms, I would like to get all other post except the one with post id 164 as the output of the below code. Please help. <div class="room-container ...
0
votes
2answers
41 views

Modify WP_Post before processing

I am looking for a way to modify WP_Post object before it's processed and displayed on the page. Reason - I built my site when WP was still in version 2.0, or even earlier. I didn't attend to it for ...
0
votes
0answers
18 views

Custom taxonomy save only last checked category

I create custom post_types and custom taxonomy. I want save post in more one category (taxonomy). Taxonomy -> hierarchical. When I cheked more one category (taxonomy) post save only first or last ...
0
votes
0answers
10 views

Set the “All Posts” admin column to be “Published” rather than “All” [duplicate]

When I look at all my posts in the backend (http://www.my-website.net/wp-admin/edit.php) "All" is the default view. How do I set "Published" as the default view?
0
votes
0answers
27 views

Can't set post permalinks without breaking single page for ACF

I am using Advanced Custom Fields to make sections where a user can post products to a shop page and then have set his owl external URL. This works fine but I've just noticed some problems and I can't ...