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
2k views

Verify if tag is used on posts

I'm using site tags for a glossary. I would like to display a link to the tagged page if the tag exists, otherwise just display the tag title. Is there a check which would allow me to determine if the ...
1
vote
2answers
2k views

Delete Post Link to delete post, its meta and attachments

I used // Delete Post Link function wp_delete_post_link($link = 'Delete This', $before = '', $after = '', $title="Move this item to the Trash", $cssClass="") { global $post; if ( ...
1
vote
1answer
318 views

[Plugin: Posts 2 Posts] Changing display order of connections

Can I change the order in which connections are displayed ? If I create say three connections and then display them at the bottom of my article, I will get them in reverse order. How can I change ...
1
vote
3answers
473 views

“more” tag doesn't appear when browsing category achives or search

Almost finished my website, but ran into one problem: When you view the archive of a category or do a search, the "more" (or "continue reading") link/ tag doesn't appear. It words fine on the ...
1
vote
1answer
365 views

Enable comments for post with comments meta box removed

I have created a custom post type in a plugin for a site I'm working on. I'm allowing users assigned a custom role to add/edit/delete the custom post type. I would like to give these users as little ...
1
vote
1answer
1k views

How to use WP default post list tables in a plugin?

I'm developping a plugin to manage a base of users and I'd like to show them in the same type of table used in other parts of the WP admin (post lists, user lists, etc.), I'd like to have the same ...
1
vote
1answer
936 views

Get post ID outside of the loop

I am trying to accomplish something somewhat simple I think. I have a menu item at the top of my page that I want to link to the latest post in a certain category. I just need to get the post ID of ...
1
vote
2answers
4k views

Template file for static posts page does not get loaded?

I have this inside my posts page (set in the admin panel: Posts Page: Blog): blog.php <?php /** * Template Name: Blog * @package WordPress * @subpackage Prominent * ...
1
vote
2answers
972 views

Custom Taxonomies Incorrectly Counting Revisions?

(Moderator's note: The original title was "The count of my custom taxonomy is incorrect; it's counting revisions") Has anybody run into this before? I've added two custom taxonomies, and the count ...
0
votes
1answer
57 views

Create new Wordpress post [wp_insert_post] based on results of a WP_Query

I have a a page where users can filter a list of custom post-type posts based on the "Ultimate WP Query Search Filter" plugin. Results are passed to a div on the page using AJAX from there users can ...
0
votes
2answers
48 views

Looking to exclude blog posts from category Previous/Next buttons

I'm working on some conditional elements here and I thought I had it but it's still not working right. You can see my site here. What I've done is displayed only category Legal Libation Columns (98) ...
0
votes
1answer
42 views

Custom Post Type used for FAQs Accordion

OK, so I asked this earlier and no one had any answer for me. I have a CPT for FAQs. FAQs are separated into 'categories.' I need the name of the 'category' then a every post within that 'category.' ...
0
votes
2answers
166 views

Pagination not working on Custom Page Template

I searched a lot on this but I can't figure out why my code is not working. I published a page with slug "blog" that uses a custom built template "page-blog.php" that I build from editing the ...
0
votes
1answer
25 views

Show One Category on Post

How do i go about making the code only show one category? <?php $categories = get_the_category(); foreach($categories as $key => $category) { $url = ...
0
votes
0answers
41 views

Hook into trash_post_comments, update_user_meta

I have a theme where the author get points for posting posts and comments. When I trash a post, the user get 1 point removed from their score. This works fine with this function: However... When I ...
0
votes
2answers
47 views

How to get post body look same as my visual editor?

When I apply the format and styles such as bold and <br/> on visual editor it looks bit nicer. But when I see that on blog post it looks totally different. I do not use any styles for p tag in ...
0
votes
1answer
51 views

Overview with latest edited posts and pages

I'm looking for an overview of all the latest user activities. But I don't want to see comments on this page, just the edits or creations of new posts or pages. Unfortunately I can't find such a ...
0
votes
1answer
65 views

Display posts in random post types

I am currently working in a project in wordpress. Here i have to get all posts from two custom post types namely pt1, pt2. But here i want to display posts with random post type(pt1, pt2). Example) ...
0
votes
1answer
64 views

Assigning a role to a specific custom post type (and ignoring other post types)

I have a new post type called "story" And a new role called 'Writer' (w/ a 'publish_story' capability) I want it so that, a Writer when logged in can edit Profile and only edit a custom post type - ...
0
votes
1answer
88 views

Retrieve latest post by multiple categories with ID

I have the categories listed below in my product post type. Category Name: Test 1 ID: 82 Category Name: Test 2 ID: 83 Category Name: Test 3 ID: 84 Category Name: Test 4 ID: 85 Now I want to ...
0
votes
0answers
48 views

exec JavaScript using add_action when publish_post

How can I execute some Javascript code when an user publish a post I want to do something like this before publish a post: add_action ( 'publish_post', 'custom_links' ); function custom_links() { ...
0
votes
1answer
193 views

Enable commenting on front-end preview page for pending posts

We are in the process of allowing authors to collaboratively be a part of the editorial process. They will have access to all pending posts' preview pages (not post-edit pages). I want to allow these ...
0
votes
0answers
262 views

WP blog posts index URL

I want to use WP for a site that blog is just one aspect of it, and I don't want requests to home_url list blog posts (post_type=post), I want them be to fetched using another URL. This topic ...
0
votes
1answer
635 views

Single.php Active Category Class

Currently by default (I believe) when you're on single.php, Wordpress doesn't add a "Active" class to the blog category you're viewing the single post in like it would for pages or if you're on the ...
0
votes
1answer
1k views

Enable sticky posts to custom post_type

i have this custom post_type: tvr_apartment function custom_post_apartment() { $labels = array( 'name' => 'Apartments', 'singular_name' => ...
0
votes
1answer
132 views

Network wide post count (WP Multisite)

I'm trying to show the total amount of posts of my WordPress Multisite. For that I'm using the following code, which worked at the beginning. So I guess that there's something wrong with the ...
0
votes
1answer
258 views

Create Post tabs in single-{content-type}.php with Custom Field values

My requirement is exactly similar to Tabbed Post. I have Advanced Custom Fields (ACF) plugin to store data. So pulling up the requirement from the wordpress support thread: Movie Summary | ...
0
votes
1answer
171 views

Multiple Loops Breaking Pages

I'm new to WordPress, and I'm having an issue with "The Loop." I have a sidebar on the left side of a page that's supposed to show recent posts from two categories. In the middle of the page, there ...
0
votes
2answers
177 views

How to output comments number of a post per day?

I have a question about the comment numbers in a post... For now, I can output the total number of a comment inside a post outside the loop. That's cool enough, but I want to get show the comment ...
0
votes
0answers
63 views

Add Custom Post Type Categories to General Categories

I've created three custom post types. I want them seen as general categories. I could not find a solution, can anybody help me? Thank you.
0
votes
1answer
172 views

Hide parts of the post content on the home page

I have a post that contains a video (or a slider) and some text. Is it possible to hide the text on the home page, but still display the rest? How would I do that?
0
votes
1answer
340 views

Show the title of the latest post by author

I have the following function which I use to show the author name,author avatar and the author biography in a div. I need to show the title of the latest post by the author along with this. Can anyone ...
0
votes
2answers
396 views

Odd/even class on article tag

I am using the article tag with the following code: <article id="post-<?php the_ID(); ?>" <?php post_class('clearfix span4 '); ?> role="article"> </article> and I would like ...
0
votes
1answer
168 views

How to extract images of post and pages excluding header and logo image in wordpress?

I have tried this code to get all images from media library and i am sucessfully getting the source urls of all the images but now i want to exclude all the unwanted images like logo, header images ...
0
votes
1answer
157 views

Navigation link to specific user page

I asked this question and got a great reply - Associate Page with User - so I can now associate a post with a specific user as required. What I want to do is include in the main site navigation a ...
0
votes
1answer
145 views

Adding a user's ID behind the <a> tag ref link address

Good day, everyone: I want to make wordpress to add the user's id number behind the ref's link string, so that, for example <div class="toolsbutton"> <a ...
0
votes
1answer
120 views

How to add an admin function only to posts, not pages?

I'm having a problem with adding an excerpt counter to the excerpt field. It may be a conflict with another plugin, but basically it screws with other jquery if the excerpt field doesn't exist (e.g.: ...
0
votes
1answer
279 views

Custom Post Title as search term

is there any way to include custom post title as search term. I create custom post types - VHS, DVD, Blu Ray. Then in search box when I write DVD I want to list all posts from custom post type DVD. ...
0
votes
1answer
80 views

Which file displays the date archive?

I'm building a new theme. I'm now working on to figure out which file is needed to show the "whole" post for a specific date which displays when you click on a date in the built in WordPress calendar ...
0
votes
2answers
913 views

Display all posts from specific categories on a page

I want to display all posts from specific categories on a single page. Therefore I edited the page.php file in my theme folder. I added an 'if-clause' to check which page currently being displayed and ...
0
votes
1answer
2k views

Refresh problem post is duplicated when page is submitted after page reload

I have a form on my website, that creates a post from front end. So every time when I refresh a page I got this message first: The page that you're looking for used information that you entered. ...
0
votes
1answer
129 views

Shortcode for tables which can include comma and linebreaks

Is it possible to make a shortcode for table which can include commas and linebreaks for its content? I've been trying to output something like this with shortcode: But it seems difficult. I tried ...
0
votes
1answer
2k views

get_page_by_title() not returning anything

I'm trying to use get_page_by_title() to get the value of a parent custom post type through Gravity Forms. Basically a patient name is stored in a custom post and their patient id is the post title ...
0
votes
1answer
1k views

How to choose a sort order (for posts) per category? (ideally when creating a new category)

Assume I have a bunch of posts (articles) in two categories: "upcoming events" (cat=1) and "past events" (cat=2). When listing all posts of a specific category out of those two, category 1 shoud be ...
0
votes
2answers
650 views

Delete Child Posts

I'm trying to delete all child posts when the parent is deleted. The parent post deletes just fine, but the child posts are not properly deleting. Here's the code I have in place now: $args = ...
0
votes
3answers
862 views

Downsides to not using built-in “Posts” post type?

I plan on skipping the Posts post type once and for all. This is a brand new portal. It will have 100s of thousands of content in the form of articles, multimedia, and links. Instead of Posts, I will ...
0
votes
1answer
1k views

Use template of parent category for single post sub-categories

I have single post templates in a folder in my child theme marked "single". I need the sub categories to use the same template as their parent. I've read a dozen tutorials all of which were more than ...
0
votes
1answer
672 views

How do I do a page break?

Is there a way to add a page break into length pages? Preferably automatically, but doesn't really matter. Ideally without a plugin.
0
votes
1answer
376 views

Wp-query causing problems with the_content();

I'm using some code provided in an answer on here to calculate "post X of Y" and display pagination icons on single.php. It works beautifully but it's causing problems displaying the_content(); On ...
0
votes
1answer
97 views

Display “Post 2 of 4” on single post page?

I have a custom post type called Projects. When viewing a single 'project' post I have next/prev buttons to navigate through them. I also want to display text saying "Project 2 of 4" or ideally ...