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)

3
votes
1answer
1k views

Search posts by post author name

I want to search posts publish by particular author. For this purpose I added a filter in functions.php: function wpse_29570_where_filter($where){ global $wpdb; if( is_search() ) { ...
1
vote
3answers
15 views

count_many_users_posts except current logged in user?

Is there a way to count and show the count of all author posts in a custom post type except the current logged in user? I was hoping there's a way to do it with count_many_users_posts but it doesn't ...
1
vote
2answers
393 views

Why does `url_to_postid` return 0 when testing `page_for_posts` Page?

If I set Reading Settings > Posts Page (in other words, the page_for_posts option) to a static page, and then attempt to pass its URL through url_to_postid() it will return 0 - why is it? I ...
0
votes
2answers
15 views

Query post for today, if no post get the previous one

EDIT : I answered myself. Simple request for you. I am trying to develop a code that search for post for TODAY. If it returns nothing, then get the latest post before today. For now, I have made a ...
0
votes
0answers
5 views

BuddyPress Favorites Activity Stream Not Working

I’m new to BuddyPress, but would like to use it on a site I’ve developed recently. I’m specifically looking for the ‘Favorites’ Activity Stream, per client request. After install, I checked my blog ...
0
votes
1answer
33 views

wordpress: creating a contact form without a plugin

I am working in wordpress, and in one of the pages, I need to add a contact form not using an existing plugin. I have tried to create a contact form as I usually do with PHP. The form must send an ...
0
votes
0answers
8 views

How can I add pagination to posts that have pages?

I want to have table of contents for my posts on top of every page (with titles that I fill in myself for each page) and dropdown menu with all the pages at the bottom of the posts that are paginated ...
0
votes
1answer
18 views

Optimizing the blog loop

I've got such post loop: <?php global $post; $post = $post_object; setup_postdata( $post ); $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts(array( 'post_type' ...
0
votes
2answers
596 views

WP Query - duplicated posts once including tags in search results

I running WordPress on IIS & SQL server. As some of the plugins do not work correctly with DB ABSTRACTION I am using a lot of functions.php filters as so on. To make my search results include ...
2
votes
2answers
4k views

Attach pdf file to custom post type

I am trying to attach a pdf file to a custom post type. I have found this snippet at wpsnipp.com. The code does the trick, but only for posts. I have a custom post type named 'events' and I can't ...
0
votes
1answer
869 views

Auto insert More tags in all posts

I have a theme for my mobile site that requires the <!--more--> tag in my posts for it to display an excerpt of my post's content. I've got over 2000 posts already, and its going to take ...
0
votes
0answers
12 views

making custom post publish/update button

I'm here with a issue regarding my plugin... I've added a menu that should serve as a floating quick-action menu.. For example i would like that if you click the save button it will save the current ...
0
votes
1answer
18 views

I am unable to publish/update post

I am running wordpress 4.3 with my custom theme. Everything was going fine but today when i tried to post new article on my blog i notice that when i click on publish button it stuck on loading. I ...
0
votes
0answers
20 views

How to create a Trending Posts Page?

I need to create a "Trending Posts Page" that shows the 20 most viewed posts of the current week (last 7 days), based on the high number of views. Any help?
0
votes
0answers
10 views

Need help writing loop to display posts by categories in separate divs

Total newb to WP codex. Below is what I'm attempting (the comments describe what I want the loop to do). Thanks in advance for your help! <!-- if there are posts in category slug A, show div below ...
6
votes
5answers
7k views

Can posts have parents?

Are posts supposed to have parents? If so, what would that mean for a post to have a parent? Also, if there are some constraints to posts having parents, then where is that enforced? Not in the DB as ...
4
votes
1answer
160 views

Hide password protected posts in admin

I'm building a site for a client and we're using WordPress' native password protect functionality. Is there a filter or some kind of action to filter posts retrieved in the administration panel? If I ...
0
votes
2answers
52 views

Show posts by author of membership level (Paid Membership Pro)

I am currently listing posts based on user role, with the following query: $ids = get_users( array('role' => 'author' ,'fields' => 'ID') ); $args = array( 'author' => implode(',', ...
-1
votes
0answers
19 views

How to add an image below every post?

I want to add an image to the bottom of every post. I have this code, but just get an error: function add_after_post_content( $content ) { if ( !is_feed() && !is_home() && ...
1
vote
2answers
44 views

How to add a button to custom post type's posts-page

How can I add a button to a posts -page. (In this case a custom post type). I'd like to place it next to, or near, the "Add new" button, to import content from a web service.
0
votes
1answer
437 views

Hiding posts - WP Hide Post not working

I frequently publish posts that I need to be hidden. They need to be published, so that someone who has their url can go to them, but I don't want them showing up on my homepage, in my recent posts ...
0
votes
0answers
10 views

get publish / move to trash post URL

I'm having some issues finding the URL's for the publish/update and move to trash buttons. I have something like this : <a href="#" class="menuu-item"> <i class="fa ...
0
votes
1answer
18 views

Edit Posts Page but not category specific pages?

Is there a way to edit the page that shows all your posts? But not affect the specific categorized pages? I have been trying, and cannot seem to find a solution.
0
votes
0answers
13 views

Adding Information To All Posts Screen

What I'm looking to do is add the value of a post's metafield in each post's row on the all posts screen. I'm attaching a screenshot of where I'd like this information to show up. The info would be ...
0
votes
1answer
892 views

Using radio button meta data from a custom meta box

Very new to attempting PHP and am hacking together my first plugin using tutorials.. I have a custom meta box with a Yes/No radio button on all WordPress pages (in the editor). EDIT- I removed the ...
0
votes
1answer
16 views

How to activate Markdown in a local installation of WordPress 4.3?

As of version 4.3. it should be possible to activate markdown for my posts and comments (http://news.softpedia.com/news/say-hello-to-wordpress-4-3-489688.shtml). I found a description on ...
0
votes
0answers
19 views

Listing posts according to their popularity and hyperlinking them

I have 3 options in the header of my page recent,popular and feature. I have written a function as follows : function category_recent(){ $cate = get_the_category(); $current_cat_id = ...
0
votes
2answers
868 views

Archive Page for Custom Post Type is not Working

I have registered a custom post type "tutorials" with the following snippet. <?php /* Template Name: Tutorial Archive */ get_header(); ?> <div id="content"> <div ...
1
vote
2answers
31 views

Counter of posts ever posted - even deleted ones

I'm trying to figure out how can I display the amount of posts ever posted - not only the currently published, draft + pending etc ones, but even the deleted ones. I assume that there has to be ...
0
votes
4answers
8k views

Get current category id from post page wordpress

I have a problem to get category id of current post. We are using <?php get_the_category( $id ) ?> for finding out category of current post. If a post like 'demo' has 2 category like cat1 and ...
0
votes
1answer
38 views

How can draft post after 1 year

I need to do this in my post in custom post type, I need when to day publish new post. After 1 year from today convert post status from publish to draft. How can do that ?
1
vote
1answer
2k views

Wordpress schedule posting not working

I have Wordpress 3.5.1 and I use Bluehost hosting service. When I schedule posts after that time passed, WP posts dashboard shows "Missed schedule" message under the date. Then I checked my ...
0
votes
0answers
14 views

modify admin panel all post to show date time

Hey I want to Know how can I modify admin panel all post to show date and time instead of only date. Published post will have published date and time and scheduled post will have scheduled date and ...
0
votes
0answers
12 views

Embed button for post screen

i would really appreciate it if someone could help me change the "add media" button on the post screen, and make it rather go straight to "insert from url" so that my users embed a link without ...
0
votes
0answers
18 views

Re-layouting the “Settings Menu” in “Add a New Post” page

Just asking a quick question here to see if anyone can help me out with this issue. I am building a blog website, but the "Add a new Post" page menu to select publish, categories etc default layout ...
0
votes
1answer
11 views

Post Format problem

I'v tried really a lot of solutions, and the one that works, it works half a way. Inside single.php I'v added <?php while ( have_posts() ) : the_post(); ?> <?php if( ...
0
votes
1answer
14 views

send email to author of post on post submission

i am using wordpress directory theme.I want to send email to author of the post whenever he publish a new post. currently email is just sent to administrator only.i didnt find any code utilizing ...
0
votes
0answers
10 views

Display Post Image Wrapped in Div, Inside Link Tag

So I'm trying to wrap media images published in a post into a custom div, that is also wrapped in a link tag that has the permalink of the media image as it's href. Here's the filter that I've made so ...
0
votes
1answer
732 views

Listing Specific Categories from Current Post with Depth

I've been on this for sometime and been having a ton of issues to find a proper way to do what I'm trying to achieve. An Example would be as follows: I have a featured Image with a rollover and I ...
0
votes
1answer
362 views

Display only posts from a specific parent category

I have a category structure similar to the below: Grand parent cat - Parent cat 1 -- Child cat -- Child cat -- Child cat -- Child cat - Parent cat 2 -- Child cat -- Child cat -- Child cat ... if I ...
5
votes
2answers
1k views

Add custom Attachment Display Setting for images

I've been doing a lot of research and I've yet to work this out. Can you add in a custom option in the Attachment Display Settings (part of Insert Media dialog in post editor)? What I'm after is the ...
3
votes
2answers
1k views

Connection lost. Saving has been disabled… (Updating Posts/Pages)

I've been developing for Wordpress for a few years now without any trouble on an old XP/WAMP development server (v1.7.4) but recently have been getting the error "Connection lost. Saving has been ...
0
votes
1answer
57 views

Exists filter or action that change Add New Post link?

I want to know if exists some method from filters or actions to change the link of the Add New button in backend , for example the regular url is http://wordpress_install/wp-admin/post-new.php but I ...
4
votes
1answer
53 views

Keyboard shortcut for updating a page or post?

What is the keyboard shortcut key for updating a page or post? It could save me a lot of time as rolling down a page draft is time consuming.
0
votes
2answers
686 views

Only display sticky post or latest post in custom loop

I'm new to Wordpress and PHP and I've been battling with this for a while now. What I have for the moment is 2 loops. I want to first loop to only ever show 1 post: either a sticky post, or the ...
-3
votes
0answers
48 views

Post rating without plugins?

Is there any simple post rating snippet which will work when page is cached. There is many functions, for example this: <form method='POST' action=""> <input type=hidden name=rate ...
0
votes
0answers
13 views

Cannot use pages created on WP

I am quite new to WP and I have recently taken over a development project of a page that I really don't understand quite well due to the weird options that the previous developer took. Unfortunately I ...
1
vote
4answers
7k views

Count posts within a custom post type and specific category

I'm looking to count how many post live within the custom post type called "videos", but only the ones from the category called "work". <?php $count_posts = wp_count_posts('videos'); echo ...
0
votes
1answer
1k views

Trying to alter the post_content through the_post

I'm trying to change the post content of a page by hooking into the_post action, but the problem is that whatever I modify in there doesn't really get applied correctly. The problem seems to come ...
3
votes
1answer
77 views

Let readers suggest edits from the frontend

I'd like to make my articles editable at the front-end for any reader who visits the site. (More like a wiki). I don't really want to trouble them through the registration process. I have no idea how ...