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
2answers
419 views

Find attached images for one post type

I would like to query for images attached to ALL posts of certain custom post type (e.g. 'gallery'). I can't see a way to do this by using only WP_Query. The workaround would be to query for all ...
0
votes
2answers
31 views

generate unique slug while inserting post

How can i create unique slug while inserting a new post.. I know i can query posts and compare the records to create unique slug but I want to insert a post with unique slug at the same time. Lets ...
-1
votes
1answer
45 views

Wordpress limit post that subscriber can create

Hi my wordpress users are able to submit posts. But I want to limit the number of posts that they can submit. Can you help me? I already tried ...
0
votes
1answer
24 views

cleaning out posts that don't exist anymore but links are still there

First off I'll start by saying i think my site was hacked... Today i was looking at my jetpack site stats and it said i had a huge amount of visitors. a lot more than i usually do.. jet pack said that ...
0
votes
1answer
22 views

Export Posts with specific custom fields by sql

My development site has posts with custom fields. Meanwhile my live site has more posts added while I'm working on my development site. Now I want to export posts with specific custom fields from live ...
0
votes
0answers
29 views

Different post types arranged on one page

Lets say I have a wp-site with three pages: "Home", "Project" and "About". "Home" and "About" are static pages, and "Project" has sub-pages. I want to add content to the sub-pages, in form of posts, ...
0
votes
1answer
29 views

get_page_by_title() not working if special characters are present

get_page_by_title works fine on plain text title. but when it comes to smart quotes and symbols like # it doesn't work. It fails to find post with the given title. For Example:- ...
0
votes
0answers
53 views

Archive.php won't show posts

Hey there:) I can't figure out why my posts is not showing up in my archive.php page(news). I wrote this code in archive.php <?php /** * @package copenhell */ get_header(); ?> <div ...
0
votes
0answers
7 views

web.com/post/post-title redirects to web.com/post-title

I'm having a complain of the SEO guy because a post url is not like this web.com/post/post-title But like this web.com/post-title And even web.com/post/post-title redirects to web.com/post-title ...
0
votes
0answers
21 views

Display posts from the same child taxonomy as the current post

I’m following this tutorial I have two custom taxonomies (events / centers), with their respective child taxonomies ( event1, event2… / center1, center2…). What should I change to display posts from ...
0
votes
0answers
17 views

Custom fields in normal posts

I have created numerous custom fields for custom post types, but I am a loss at how to do it for normal post types. The codex suggests doing it with in admin section but this seems to only apply to ...
0
votes
0answers
14 views

Set post beginning date and final date

I'm developing a website that is like a Advertisements System. I tried to use Post Expirator but it doesn't work the way we need. It must set a BEGINNING DATE and EXPIRATE DATE. Because will be A ...
0
votes
2answers
2k views

get_the_category listing in hierarchial order

Hello at the moment I'm wondering how I would be able to make this work to post in Hierarchical order within the post loop. <?php foreach ((get_the_category()) as $childcat) { ...
0
votes
0answers
54 views

Dynamic form variables for post meta

I am trying to create a dynamic form in the wordpress admin where I can add a line and still be able to process the variables into the database as post meta. I've done quite a bit of research and ...
0
votes
0answers
31 views

Dump all posts to file via WordPress JSON API?

I would like to dump all posts to a JSON file so I can include it in my mobile app project. That way, the app can work offline for the most part, then I just have to query new and modified posts from ...
-3
votes
1answer
38 views

How to add thumbnails in posts on homepage?

This is preview of a post on my friends site : and this on my site : Please tell me how to add thumbnail like that ?
0
votes
1answer
64 views

Exclude posts that only have the 'Uncategorized' category [duplicate]

I want to exclude posts that only have the Uncategorized category (i.e. category id 1), but if a post is (erroneously) categorised as "Uncategorized" but also has other categories, I want to include ...
-1
votes
1answer
47 views

Post as frontpage - avoid duplicate content

On one of my WP sites I display a single post on the homepage. It's hard coded in the index.php like: If is home then show post with ID X But now I have the post's content on the homepage but ...
0
votes
0answers
53 views

WP_Query custom field pass the post id

I'm using WP_Query with ACF(Advanced Custom Fields) I'm building a news portal, and I'm trying to pass related stories from 1 post which is top_story = true. In another WP_Query I want to print the ...
1
vote
1answer
39 views

Allow users to create posts without logging in?

I am working on a site where users can share their story. Every story is a blog post. I don't want that they mail me the story and I publish them, I want to provide them a form where they provide the ...
0
votes
1answer
28 views

Modify WordPress loop after it has been run

I am trying to build a category page that displays 8 posts from the category, but when the user clicks on "Read More" (which does an Ajax request and displays more posts), I would like the loop to ...
0
votes
0answers
24 views

Publish Post but don't call publish hook in foreground post creation

I'm using Subscribe2 to send new post notifications to registered users on my site. I've got a couple hundred subscribers and when I add a post on the front end through a HTML page when I submit it, ...
0
votes
1answer
33 views

How to get next_posts_link working with a customised page

I have a customised page using a template and am trying to make use of next_posts_link and previous_posts_link to have buttons at the bottom of the news page. Trouble is when clicking on them it ...
0
votes
0answers
19 views

Post comments getting added to unrelated media, not post

I'm in the process of setting up and testing a new WP install (this is my first time setting up my own WP site). With a test user I added a comment to a post. After refreshing the post page a few ...
1
vote
1answer
73 views

Creating bulk posts with Youtube videos

I'm a bit new to Wordpress and I'm a bit lost reading all sort of docs about creating bulk posts using PHP. I've wrote a small code that using Youtube API v3 to get all the videos from a Youtube ...
-1
votes
1answer
40 views

Custom post order returning posts from other categories

I am trying to order each post in a category by custom field (using Advanced Custom Fields Plugin) $the_query = new WP_Query(array( 'posts_per_page' => -1, 'meta_key' => 'adult_price', ...
0
votes
0answers
37 views

Loading index.php contents which located outside blog folder for post single page

I'm creating blog page as WordPress for my static PHP website. When blog page URL changes to pretty permalink (example.com/blog/my-post-page), loading contents (not redirecting to index.php, only ...
4
votes
3answers
3k views

How to add category to: 'wp-admin/post-new.php'?

I want to have a link to create a new post that sets the category also. I have tried wp-admin/post-new.php?post_category=12 and wp-admin/post-new.php?cat=12, but neither worked. I also tried using ...
0
votes
1answer
35 views

How to display multiple images from the post on the homepage

I have a wordpress question. Each post has multiple thumbnails, company logo and description. See the mockup: http://d.pr/i/19rBb And on the homepage, I would like to display all the thumbnails ...
0
votes
0answers
38 views

Change wordpress blog post permalink structure

My blog post URL consits of Website Name % Year % Month % Post Name. If i update any post, it does take the new Date as the post URL. Is there a way so that i can change the Permalink structure ...
12
votes
1answer
351 views

Is there a action hook for the “Empty Trash” button?

I would like to run a function when the user clicks the "Empty Trash" button for posts. Something like: add_action('empty_trash','myFunction'); function myFunction(){ // My code }
0
votes
0answers
14 views

Custom URL Structure for posts with subcategories

I have a website with the following structure in Posts: 14k-gold-silver - Symphony - Noir 14k-gold-diamond -forever classic -bridal Now I added some itemes to each of the sub categories ...
0
votes
0answers
10 views

alter $post variable in main query as soon as possible [duplicate]

I'm using WP with WooCommerce. For some purpose, I want to load a predefined static page (e.g. with id=5) whenever the user enters a product page (e.g. www.mysite.com/?product=my-product), by ...
0
votes
1answer
39 views

Custom plugin to get related posts by category

I'm learning how to create custom plugins for Wordpress, I am trying to get related posts by category. The problem is, I am returning all posts regardless of it's category whether it's the same ...
0
votes
1answer
617 views

Add filter-by-tag in the all posts admin console page

By default the 'all posts' page contains the following filters by date by category Is there a way I can add 'by tags' as well ?
0
votes
1answer
65 views

How can you display all sibling categories to a post?

I would like to achieve a list of sibling categories to the deepest level category (4 or 5 levels deep) of my posts, for example: Post about South Sudan (breadcrumbs = World, Africa, East Africa, ...
0
votes
2answers
1k views

How to call Wordpress First Image Post or else Attached Image or Default

Can anyone help me develop a wordpress script that [IF] will get first image post and if it doesn't exist it will [ELSE] get first attached (uploaded) image. Theoretically: [IF exists] <img ...
0
votes
0answers
19 views

Is Hfeed class for all pages needed

Hey there :) I'm trying to fully understand the Hfeed class used in underscores.me themes. I'm developing a site on most of the underscores structure, but I can't figure out if I can remove the hfeed ...
0
votes
0answers
10 views

Creating a Publication posting on site from another site

Options : Create a New Post in a web -1 from another web -2 . or Everything is created in wordpress -2 be " copied " to the web -1 I 've used the built multsite with ThreeWP - Broadcast, but has ...
1
vote
3answers
3k views

how can I set the post author of a post I just created with php?

I'm using php to dynamically create a custom post, and I need the author to be someone other than the logged in user. I found this ...
0
votes
0answers
15 views

Detect DOM Changes in Custom Metabox

I have a scenario where I use a custom metabox that contains two tables. One table contains a select list which a user can then add details about the selection. When complete, they click a button to ...
2
votes
4answers
3k views

Get Next / Prev 3 Posts in Relation to Current Post

I have 7 posts, like this: 1 2 3 4 - this is the current post 5 6 7 As noted, number four is the current post being displayed. I need to create a query that will allow me to display the previous 3 ...
1
vote
1answer
56 views

How to add custom content (text/image) at start of content (IN content ie the same line)

I would like to add some text or image at the start of each post (in a given post layout). I have found numerous ways to implement this before the content starts ie atop the content (of course, I ...
0
votes
0answers
18 views

Deleted empty posts - menu gone

I just discovered that my site had a lot of posts with no title and content. I thought it was empty posts I had created when misclicking on create post instead of create page, so I sent them to trash. ...
0
votes
0answers
17 views

Get post attached in sequence

I'm trying to do a reader, that will take images that are attached to the post.Kinda like a comic book reader, which has a button to the next image. However only saw snippets that show to catch the ...
0
votes
1answer
61 views

How can I fix a slow redirect after form submit from frontend (no plugin)?

Below is the code I'm using for my short-coded form and to add the post. Here's a basic overview of the problem I'm trying to remedy: -This form is displayed on the page at /addmember/ -On this ...
0
votes
0answers
37 views

Making a frontend posting form with file upload

I've spent the last few hours searching and trying different ideas to no avail, so I thought I might ask for a bit of help. I'm wanting to make a form that allows registered users to post from the ...
1
vote
0answers
31 views

How to compare two posts including their meta fields on a scalable base?

I have set up a wordpress in a way that posts can be cloned and be altered by a different author. whenever this is the case, i want the administrator to be notified via an additional tab in the ...
1
vote
1answer
1k views

Load posts into sidebar and paginate via ajax?

Is it possible to paginate, or load the next / previous posts in the sidebar without messing with the entire page pagination? Such as AJAX? Right now I'm querying custom post type posts to load the ...
0
votes
1answer
25 views

Blog styling in SASS

Every so often I get a request like this: "Build a site using WordPress as the CMS [easy...]. Oh and we'll have a standard looking blog thrown in. No need to worry about styling, the default look ...