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

Driving a random quote like functionality with database

I want to have functionality like this: A random quotes appears in particular section of the website (say sidebar) after a particular amount of time(say everyday). I want to power it up using a new ...
0
votes
1answer
31 views

Hiding menu on mobile only when viewing posts?

I would like to hide menu on mobile only when viewing posts. Menu at the homepage should be visible on mobile but not the other pages. How can I do it? Here is the menu snippet: <nav ...
0
votes
0answers
16 views

I'm trying to display full posts on my custom website

I have successfully integrated WordPress with my website and have it displaying the title of each post in a list format. I would ideally like to display the full post. I've tried changing ...
0
votes
1answer
26 views

Accessing Post ID Within Loop

I have a page called Products with an ID of '8' Within that, I have the following template part <?php get_template_part('loop', 'feed-products' ); ?> Then within that file, I have this ...
0
votes
0answers
17 views

My custom template is displaying 2 Home pages

I'm developing my wordpress theme and I have a problem. I have my homepage.php and galerie.php (custom page templates), the problem is that I want the posts to go to the galerie.php page and not to ...
0
votes
1answer
23 views

In post.php how can I remove onbeforeunload?

I am trying to remove the onbeforeunload on post.php but none of the solution I have found online work. I tried: (function() {window.onbeforeunload null;})(); I am using the action: admin_footer ...
0
votes
2answers
24 views

Posts don't appear on Template Page

I made a Template page galerie.php and I wanted to show posts there. Why isn't this working? It seems that posts only appear at home page for some reason. The code is: <?php while(have_posts()) ...
1
vote
2answers
21 views

Posts not showing on page

Can anyone spot anything wrong with this code(see below). No content is showing up on my page. Many thanks in advance. <?php $args = array( ...
0
votes
2answers
52 views

Related post by category throws internal server error

I am using thesis in wordpress 4.1 i am trying to display related post by category with bellow function but when i go to the post detail page it throws internal server error.i have used same code in ...
0
votes
0answers
23 views

Displaying all posts of a category in a page, using a template?

I am writing a plugin which (among others) wants to display posts of a certain category within a page. While I can do that with the various functions there are available (WP_Query etc) to iterate ...
9
votes
1answer
107 views

Should we trust the post globals

@toscho left a comment to this answer which had me thinking again. How much trust should he have in the global scope, specially regarding the post globals like $post. So what? The global variable ...
0
votes
0answers
14 views

How to access post information from two separate plugins

Essentially I have two different plugins that display separate information but they are related to each other. One plugin is to display a catalog of courses. Another is to display the schedule of the ...
0
votes
0answers
13 views

Remove DEFAULT POSTS (not custom ones) in admin panel

I am trying to hide the post link in the menu in the admin panel, my code is the following. Any idea what might be wrong? I added that string at then end of my functions file. Thanks a dozen! ...
0
votes
0answers
76 views

Customize search results to include custom posts and display in a specific template page

Below I have a function working that includes my custom posts in search results. I would like to now display these results in a specific template. I tried adding the two commented out lines but it's ...
0
votes
0answers
22 views

How to post->post_content as Html

I have to post a content as html in bellow code you can see that div <div class='pbg_info' i want post as html using $post->post_content=" and other any way the dive class 'pbg_info' is script ...
0
votes
2answers
45 views

ascending order custom post type

I'm trying to sort a custom post type in ascending order (instead of the default descending). Registering the post type like so: function codex_custom_init() { register_post_type( 'calendar', ...
0
votes
1answer
26 views

Advanced Post Display/Pagination/Ordering

I am working on a project that requires some advanced ordering of posts and advanced pagination. Basically, we have posts in a category, lets call this category 'mycategory'. We then have post ...
0
votes
0answers
24 views

Add custom field to category of custom post type

I want to add a custom field (for a icon) to categories of a custom post type. I use the default category type and not a own create category taxonomy. How can I add the custom field only to the ...
0
votes
0answers
10 views

How can add posts without category into category

I have some posts in my wordpress without category, Its above 2000 article, So i need to add this article into category that name is " News "
1
vote
1answer
77 views

How to make post sticky in the admin page?

i work with restaurant plugin that use custom post type. the question is, if it possible to select some post and make him sticky (always be in the top) in the admin? i need this because when you add ...
0
votes
0answers
24 views

CGI Application Error when visiting wp-admin/post.php

When I try to preview/publish a blog post I am redirected to /wp-admin/post.php (a white screen) with the following error: The specified CGI application encountered an error and the server terminated ...
0
votes
1answer
52 views

Retrieving posts by their date and category

I'm trying to create a plugin for displaying post titles and dates (which will be displayed as links to those posts) of a specific date range and category. So far I have managed to get to display the ...
3
votes
1answer
81 views

WP_Query to work with custom view

I have created a Database VIEW on wp_posts which selects its all columns and exposes an extra calculated columns (average). So my View is identical to wp_posts plus one column, which I want to use for ...
0
votes
1answer
46 views

Custom permalink based on custom post type fields

I'm workin on new webiste and I got stuck :( Basically I've created a custom post type for products with custom fields etc. Each product has a main category and subcategory - selected from ...
1
vote
1answer
60 views

exclude particular posts in archive.php

My archive file contains.. <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> ...
0
votes
1answer
43 views

Custom Post Type causes Page Not Found

I found a basic tutorial online which gave the rundown on how to create a plugin from scratch and sets up a new custom post type. I could not find any basic coupon plugins that accomplished what I ...
1
vote
2answers
38 views

“next_posts_link” and “previous_posts_link” display me NOTHING

I'm trying to add links "Previous Post" and "Next Post" in my single.php file without success because previous_posts_link and next_posts_link dont return anything. Honestly I do not know where in the ...
0
votes
0answers
8 views

Where is object, property or label in the database that controls the order of the posts being displayed?

I'm trying to update the database once the user has re ordered the posts via a draggable js plugin whilst is_user_logged_in(). I'll probably have a save button on the front end (in logged in mode of ...
0
votes
0answers
14 views

two permalinks for the same post

Do you know a way of having two permalinks for the same post? I have post with an hebrew slug and i want to have the same result with an english slug i'll give it.
1
vote
1answer
26 views

Save re-arranged draggable post items to wordpress database

So i've followed the clearly documented pages for the packery and the draggabilly plugins to allow for a customizable grid and looked at how localStorage can be used to remember/store data of the ...
0
votes
1answer
39 views

How to query posts with current or future date only

I want to only get posts with current or future dates, to show upcoming events. Current arguments: $args = array( 'post_type' => 'event', 'meta_key' => 'event_start_date', ...
0
votes
3answers
40 views

How to get links to the last N posts in a specific category?

I want to display the titles of the last N posts in a specific category. I am using the following code: <?php $cat_id=get_cat_ID('category1'); $posts = get_posts ...
1
vote
1answer
29 views

How to display different number of posts

How do I display different number of posts on the home page and archive pages, the archive pages can use the value set in the admin, but I want a custom number of posts to be displayed on the home ...
0
votes
0answers
53 views

Display wordpress post's in popup?

I am developing a wordpress site with some blogs.Each blog post will have an READ MORE link.when clicking the READ MORE it should open a popup box with that post contents. Can any one suggest me on ...
0
votes
1answer
38 views

Loop doesn't exclude the specified category in home page

Oh, hello! I want to show the three most recent blog posts in the home page, excluding the "featured" category, which has the ID 8. In order to see the ID for that category, I went to Posts > Category ...
0
votes
1answer
37 views

Strange switch_to_blog() issue

OK, so WordPress has been destroying me this afternoon and this particular issue I really can't figure out. We are building a multisite network and for our particular purpose need to loop through each ...
0
votes
1answer
30 views

Archiving posts in wordpress

I will have lot of posts in my wordpress site. And I want a archiving functionality. I have a separate section in my site which will show only the archives, and the archived posts will not show up in ...
0
votes
2answers
130 views

How to get current post ID in functions.php

This is my code in functions.php file. function getcity(){ global $wpdb; if($_POST['state']) { $id=$_POST['state']; $postid=$_POST['post_id']; $district = ...
0
votes
2answers
37 views

is_page Funtion for Posts ?

I am using a plugin Bottom of every post which have a a function if( !is_page( ) && file_exists( $fileName )){ which is printing custom Text on bottom of every pages, i want to show them on ...
0
votes
1answer
26 views

wp_update_post question on array

How can I run the wp_update_post function on an array of post ids.It doesn't seem to respond to an array although I don't get an error and only seems to work for one? $post_id = array(1235,1234,1228, ...
0
votes
1answer
27 views

Get posts with multiple categories

How to get just the common posts of 2 different categories? consider this category tree: posttype -news -arrangement --course --competetion --other region -region1 -region2 -region3 Now I want to ...
0
votes
1answer
43 views

How to compare post tags?

I want to compare post tags. If the tags match, then display the matching post. For example, I have a post called "ONE" with some tags and another post called "TWO" with some tags. I want to compare ...
0
votes
0answers
32 views

How to display related posts based on specific shared subcategories with current post

Im trying to find a way to display related posts that share specific subcategories with the current post. So for example, lets say the current post has the following subcategories associated with ...
0
votes
0answers
16 views

Custom Post Type Hierarchy and URL

I am utilizing the standard post and making them a person so I'll have a URL like the following: website.com/person-nam I want to create a custom post type so the user can create their own posts and ...
0
votes
0answers
10 views

How to generate WordPress post by Month?

I'm new to WordPress and php.. I'm trying to figure out how to generate WordPress post by month in list style format. So all post for October would post under one month, then start a new block for ...
0
votes
1answer
41 views

Function/filter or plugin to change post status based on custom field value

I am looking for a way to change the post status of some posts based on custom field value, from published to pending for example. How might this be possible? My solution: $post_ids = array( 1235, ...
0
votes
1answer
27 views

How do I link a Post Type to a Template in Masterplan?

I've made a new .php theme page and want to use that file on one of my Post Types. In the Templates part of Masterpress Ive added my Post Type in the availability section. However, when I view my ...
0
votes
1answer
20 views

exclude one child by id from $post->post_parent

I'm trying to exclude one child from the children of a parent. What do I need to change here? thanks if ( $post->post_parent == '4426' || in_array( '4426', $post->ancestors) && ...
-2
votes
1answer
30 views

Return All Post from publish to draft

I do something error, I transfer yesterday all post from draft to publish by my user, Now how can i return all this post to draft ??
0
votes
0answers
8 views

Multi users adding their name to a post

I'm trying to figure out a solution for a catering site. Basically, the owner will create a new post with the event details. All the employees will have their own user (something like subscriber or ...