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
76 views

Create new custom post and post category of same name

I have a custom post type "Product" and want to create a post category "A Product Name" automatically on creation of a new Product so that the post category (not custom post category) would have the ...
0
votes
1answer
32 views

Fixing my display pending posts

So basically I'm trying to make a list of posts that aren't published yet. (pending) http://streakingpirates.com/mytestpage/ here's my result with the below code so far and as you can see the post ...
0
votes
0answers
15 views

Post Pagination Titles

what I'm trying to do is set a different title for each page of the post pagination. So for example example.com/post-title/ title in the header is "Post Title" example.com/post-title/2/ title in ...
0
votes
1answer
20 views

Insert wordpress tags below posts via functions.php

I'm in the process of building my own Wordpress theme from scratch and my knowledge of PHP is limited. What I'm trying to do is insert tags below each post. I can do this by inserting code into my ...
0
votes
0answers
164 views

Where should get_post_meta() go to get $post->ID get_post_meta() is empty and $post->ID & get_the_id() are working

EDIT: So I added the full code. What I'm trying to attempt is to get the post id into the metabox values for a publish immediate and scheduled post. It appears that I'm having trouble passing the id ...
1
vote
2answers
82 views

I have over 4000 posts, will querying some of them cause performance issues?

I am wondering if querying posts like this: <?php $args = array('numberposts' => 19, 'orderby' => 'rand' ); $posts = get_posts( $args ); foreach($posts as $post) { ...
0
votes
1answer
31 views

Get post id by attachment id?

I have attachment id, but can't find way to get post id by this attachment id. I can loop all posts and find it, but maybe exists easy way get it. Does anyone know a similar function?
0
votes
2answers
81 views

Nested WP_Query breaking loop

I'm using WP_Query to get all pages without subpages. For each page I'm using again WP_Query to get all child pages of the current page inside the first loop. This all works fine and I'm getting the ...
0
votes
1answer
85 views

Display featured products by category

I have this code in my themes' shortcode to display featured product rating product like this. But I need to get product by category show. Which code do I have to add. Any suggestions? if($type == ...
0
votes
0answers
26 views

wordpress paginate, link to the right page

I have posts that I paginate, instead of showing them on their single post page I would like to show them on the archive page. I've built my own archive-page with custom functions. I just added ...
0
votes
0answers
30 views

Posts page template: How can I edit the markup for this?

I have in settings->reading changed the front page to display a static page. One for home, one for news with a custom template for each. Home works fine, however News will not change no matter what I ...
0
votes
1answer
41 views

Sort posts by activity date

I have a list of posts posted on different dates I can order the posts by date $loop_args = array( 'post_type' => 'post', 'order_by' => 'date', 'order' => 'ASC' ) How can ...
0
votes
1answer
21 views

post type slug vs page slug

I having and issue with my permalinks, I wonder if someone has solved this. Basically I have a page named videos and also a post-type name videos, so I try to access to /videos I doesnt not display ...
0
votes
1answer
22 views

2nd post different layout

As a designer I'm the ***hole who makes different layouts for posts to make a page more different. Due to this, I'm trying to create the following: This is the code I'm currently trying to fix. ...
-1
votes
1answer
221 views

How to Display Post View Count

I am trying to display post view counts. I've tried below function to display the post view count, but I'm getting same post view for all the post in loop. Not getting correct post view count. ...
0
votes
2answers
72 views

get post id in while loops outputting page id

it's been a while since I used wordpress and I am trying to us e advanced custom fields, I am trying to output the post ID inside a loop on a page, so i can use get_field to output the post contents. ...
0
votes
0answers
34 views

Get children post mime type using parent post_ID wp_post

Consider parent post_id is 11 for the same post. If I add media, the information about media is passed to the post_id 12 by taking parent_id 11 in wp_post. So, if I want to get media information ...
0
votes
1answer
62 views

Adding specific post category between posts in loop

I'm building a site built on a masonry theme and would like to add a specific category of post ('Sponsors' in this case) after every 3rd post. An example would go: Post Post Post Sponsor Post ...
0
votes
1answer
31 views

Print all content of a paged post

is it possible to print a complete post that has a number of pages? I'm working on a website that the client would like users to be able to print an article. The problem I have right now is when an ...
0
votes
1answer
44 views

Get data from wp_posts of mysql in to variables of wordpress-php script

I want to get post status, media information like the type of attachments added to the post etc in to my program. I tried this but doesn't work well $posts = $wpdb->get_results("SELECT ...
-2
votes
1answer
26 views

User submitted post

I'm sure there are plugins to do this but I wanted to try and do it myself. I have a form that contains a title and a content/message area. I would like to add this form as a post when fill it in. ...
0
votes
0answers
56 views

SWF in wordpress post

My question is somewhat a two part question. First I embedded a SWF file into my blog post using Easy Flash Embed plugin. It shows up on my desktop computer but when I view the post on my mobile ...
2
votes
2answers
118 views

How to add editor's name to entry meta byline?

I have one multi-authored blog site and a few editors. What I want is to display the name of the editor along with the author's name in a post, so that it would read like: Posted by , Edited by Is ...
0
votes
0answers
61 views

Pagination working locally but not on live site

I have a loop on my single.php page like this:- <?php if (have_posts()) : ?> <?php $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; ?> <?php $this_post = ...
0
votes
0answers
75 views

How to show blog post details on a different page?

I have currently made a template to list my blog posts <?php /*template name: Figures */ get_header(); ?> <?php nectar_page_header($post->ID); ?> <div class="container-wrap"> ...
1
vote
1answer
30 views

Post taxonomy from exif data

Whenever I post a post with a featured image, I want to extract the exif data from that image and attach it as a term for a taxonomy. I already got a plugin which can extract the relevant info, but I ...
5
votes
2answers
270 views

WP_Query Pagination on single-custom.php

What I am looking to do: Setup WP_Query pagination in a single-custom-post-type.php template file What I have done 1) Created a post type called "authors". Each post within that post type is an ...
0
votes
0answers
44 views

How to get posts from network blog

So I have function that gets posts with URL(id) (ajax stuff). It works but now I would like also fetch posts from other blogs in my network. I'm baffled how can I achieve this? Do I have to know the ...
0
votes
0answers
33 views

Sorting search results

I am trying to develop a better way of searching my website. I want: Results to be displayed by relevance Pages to be listed first, posts should be listed after pages Searched terms to be highlited ...
1
vote
2answers
81 views

Sort wp post title with alphabetically and numerically?

Is there any possible way to sort a new Wordpress post query by the title, but numerically instead of alphabetically? I have some titles that have a lot of the same name alphabetically, then have a ...
0
votes
0answers
35 views

Why can't I update the post status?

I am struggling to work out why a simple sql update is not changing the post status. Help would be greatly appreciated. I'm running woocommerce on wordpress 3.8 I'm running the following code: ...
0
votes
1answer
54 views

Add field to user meta table in database when link is clicked

I am working on function that enables registered users on my site to bookmark posts. I have searched for plugins but none seemed to do the job properly. I have a page where users can see their info ...
1
vote
1answer
24 views

How safe is renovating $wp_query when doing WP_Query pagination in Page Template

With a lot of search and trial&error, I's unable to do the pagination in a custom page template. I's not actually tired, but frustrated, why the most common err issue is not explained in a way so ...
0
votes
1answer
28 views

Wordpress plugin: Getting posts where checkbox selected

I would like to have a plugin where I could work with all post data from posts that have a selected checkbox.. To get all posts is simple with the get_posts( $args ); function... But how to add a ...
0
votes
0answers
12 views

Order posts by how many categories it is assigned to in total

I'm already doing some custom ordering based on various stored custom fields but this latest one has me stumped. I know I can get the count for how many categories a post is assigned to, but this only ...
0
votes
1answer
54 views

Posts Not Paginating

I am copying a clients site over, so I have exported and reinported the posts etc, and the theme into their new site. However, on the front page it has a pagination of the latest posts using a Widget ...
-3
votes
2answers
45 views

What function does the loop of displaying posts?

What is the function that does the echoing of posts like post title in h1 and then the post body and then the author name. I hope everyone understood what I'm trying to say else please ask in comments ...
1
vote
1answer
413 views

Get category id from post id of a custom post type

I want to get category id from post id of a custom type. I have the post id, but I can't get it's category id. I have used so many codes but it doesn't work, may be due to custom post type. ...
0
votes
0answers
35 views

404 error on every post and page other than home

I am developing a wordpress theme and I think at some point I messed something up pretty badly in the wordpress system because nothing works anymore. I have tried several different themes, mine and ...
0
votes
1answer
118 views

Display post category in foreach loop with category link

I have the following code to show current author post lists with post thumbnail, post title, post date and post category. function my_get_display_author_posts() { global $authordata, $post; ...
0
votes
0answers
68 views

Allow users to create their own page/s

I Create a network where any register user have a profile, from user profile i want enable user to create own page/s where he can post like Facebook. There is a way to do this with wordpress or i must ...
0
votes
0answers
27 views

Display images uploaded to post on the post edit screen

Does anyone know if it is possible to display an image which has been associated with a post on the post edit page without clicking on the media gallery and selecting the drop down option 'uploaded to ...
0
votes
2answers
141 views

Display post category in foreach loop

I am trying to display post category in a foreach loop. I have all the elements displaying properly except for the category. Here is my function: function my_get_display_author_posts() { global ...
0
votes
0answers
22 views

How to synchronize Outbrain Click tracking with my pageviews at wordpress backend?

Outbrain is a third party link referral service. They place links to our articles on other websites, and count the click through when the link is accessed. WordPress is not recording these at all. ...
0
votes
1answer
25 views

How to use shortcode of any plugin to show it visually where i want?

I don't know much about shortcode. I have a countdown plugin with this plugin i'm displaying 'countdown timer', i can post it with shortcode E.g [countdown event="Event with hour &amp; minutes" ...
0
votes
0answers
40 views

Update post title from external file?

I have an external script I wrote (for admins only) that loads in the following at the top: require_once('./../wp-blog-header.php'); I'm aware that it can be a plugin, but it's just not right now.. ...
1
vote
0answers
78 views

How to save double quotes in post meta, when the post meta data is an array? [closed]

Ok so I've been scratching my head on this one for a while. I'm making a plugin that adds a custom meta box to a custom post type. I'm using the update_post_meta function to save the data from the ...
0
votes
1answer
37 views

Display selected category on post page

Lets assume that we have a post which belongs to 2 or more categories and we wish to display, on the post page, the selected category through which we reached to the post page. What is the best ...
0
votes
1answer
113 views

Get current user array with post string

I need to get 10 current user fields and pass the field values to a post string. The post string is expecting certain label names for each value. Example - post string expects 'firstname' => ...
1
vote
1answer
33 views

Restrict custom post type from appearing with ?post_types=

When appending the querystring post_types = "name of your post type", it displays all the posts. I am using a plugin that has its own custom post type which is restricted (only users that have ...