Tagged Questions

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
0answers
5 views

How do I use the “Simple Posts Views Counter” on front page posts? [on hold]

I tried inserting "<?php echo_views(get_the_ID()); ?> times" into the index.php of the site's theme so all my articles will individually show the number of times they've been viewed. ...
0
votes
2answers
10 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
6 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
9 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.
0
votes
0answers
11 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
18 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
26 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 ...
-4
votes
0answers
16 views

Suggest me Wordpress plugin or mixtures of few plugin with workflow to handle this (detail in description) [on hold]

wordpress plugin that can register users and only register users have access to the front end page where he have a option for input the post title post description post image and a choose file option ...
1
vote
1answer
17 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
25 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
22 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
12 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
0answers
8 views

Display star rating on loop [on hold]

I'm trying to figure out how I can output the star rating that is displayed on the product page into the loop. Here is the code that I have trying to output the star onto the loop <div ...
0
votes
1answer
21 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
68 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
1answer
20 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
22 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
20 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
31 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
5 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
13 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
22 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?
0
votes
0answers
25 views

Function to remove all classes on images

I need to remove css style by th_content single.php Example single.php img src="http//image1" alt="" class="mycss" /> (remove alignnone size-medium wp-image-51) img src="http://image2" alt="" ...
0
votes
1answer
22 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
8 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
25 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 ...
0
votes
0answers
11 views

Display all 'uploaded to' images for a page/post in 'edit' admin area

I'm using the Frontend Uploader plugin in order to allow people to allow images to posts. This allows images to be 'attached' to posts. I can display a gallery of all attached images on the frontend ...
0
votes
2answers
20 views

How to get post ID of the current page/post inside a widget?

I'm trying hard to get the post ID of the current post/page inside a widget class but doesn't work, I know there's get_the_ID() and some other options but not a single works inside a widget. Here's my ...
0
votes
0answers
21 views

Get all post that not have any category

i am creating a frontend dashboard where i need to show all the post . So i need to show posts with all post status. Mainly published, trashed and the pending. and without category I am now using ...
0
votes
0answers
26 views

Access to the header cropping tool in modal

For the moment I access the media uploader via a meta box from the edit post screen. The code works: no problem. However, I would like to know how to be redirected to the crop tool right after the ...
-1
votes
0answers
11 views

It is possible to display advance custom field on mailchimp mail? [closed]

I am trying to display acf on mail chimp mail so its possible or not ?
0
votes
0answers
23 views

Want to get posts with their content with their category and subcategory?

I am working on a theme in which I have to show all the posts with their dedicated category and subcategory. Actually I have tried on Google and codex, but I can't find what I want. Actually I have ...
0
votes
0answers
5 views

How can get all node and id and date form 01-01-2014 and from WordPress start from 01-01-2014

I have site in drupal and i need to convert it to WordPress, So i convert all my content and node from drupal to WordPress, But i need to get all node and date from Drupal and all post and date from ...
0
votes
1answer
20 views

How to define which register_post_status goes to which register_post_type?

New to registering post types but looking at samples, and the codex not helpful here. I am not understanding how the two of these relate? This is just bare bones so someone can explain (the parameter ...
0
votes
1answer
19 views

find view post hyperlink in PHP wordpress admin file

a very simple question regarding the Wordpress backend. I would like to hardcode the link of "view post" in the post section. does anyone of you know which part I find it? Thanks
1
vote
1answer
22 views

Post slugs and images cannot have same name?

If I go to Media Library and upload an image called apple-pie.jpg And then I create a post called www.domain.com/apple-pie/ The link does NOT take me to the post. Instead the link will take me to a ...
1
vote
2answers
38 views

When and Where is `global $post` Set and Available?

Usually when people think of the global $post object it's assumed that it's actually set whenever you enter The Loop. I started to play around with how early I could actually call global $post which ...
0
votes
3answers
23 views

Get post_content with <p> tags?

I'm trying to retrieve the post content of an specific post $post = get_post(/* id */); $content = $post->post_content; However this retrieves the content with no line-breaks. I noticed this is ...
0
votes
1answer
44 views

How to pick “full/thumbnail” images in the loop?

I am picking the latest posts through the WordPress loop using the below code, but it's picking all images at full size: if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> ...
0
votes
0answers
32 views

Display page content inside a onclick popup or fancybox or lightbox

I'm doing a single page theme. So in that I would like to have some links which load the page content of the page inside a fancybox or lightbox. I've already tried Best way to load page content in ...
1
vote
1answer
25 views

Inserting custom data to the_post() during loop

I have some posts on my WordPress site, and let's say I want to add a random number for each post with $num as key and random() as value. Then I want to access them with something like: $post->num ...
0
votes
1answer
17 views

How to get only current images of a post

I am new to WordPress. I have created a template page where I want to show single posts, So to get media of that post I am using a function $args = array( 'post_type' => 'attachment', ...
0
votes
0answers
15 views

Categories showing up on wrong page

I do not run the site, but am doing some updates. One of the ones I was asked to do is remove the cats from the adopt a dog or puppy page. When I go into the dashboard and look at the posts, they all ...
0
votes
1answer
30 views

How to add category post count in main navigation menu [closed]

Can you guys can help me on how to add/show the post count for category in main menu. eg: Web Design (10) | Typography (12) | Inspiration (10) | Business (19) I’m using Hueman & Hueman child ...
0
votes
1answer
18 views

New posts defaulting to '0' primary key

When trying to create a new blog post, Wordpress is showing a Database error: WordPress database error Duplicate entry '0' for key 'PRIMARY' for query INSERT INTO `wp_posts` ...
0
votes
0answers
9 views

Sort posts in the admin list by author type (or user role or whatever)

So I know we can can sort postsin the admin pages by things like the post's terms, or author. But is it possible to sort all the posts by the user role? The site I am working on has three different ...
0
votes
0answers
48 views

How to get the Next & Previous Post Opening in Zurb's Reveal Modal Lightbox

I have set up a loop that has my posts opening successfully in a reveal modal lightbox but I'm having difficulty getting the next and previous posts to open in the lightbox. The previous_post_link() ...
0
votes
1answer
52 views

Bulk update post slugs through database

Is there a way to bulk update permalinks through the database? cause I have like 20k posts and all I want to do is add a prefix to the permalink. I could just manually update but that's too tiresome ...