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

Custom Post Types and Posts are mixed

I need help with a problem related with CPT and WP Database. I have a wordpress install with bbPress and a custom post type called Destinos. The problem is that when I´m looking for the forums, or ...
0
votes
0answers
16 views

When I update a post and at the same time trigger an ajax request, post request is cancelled

When I update a post and at the same time trigger an ajax request, post request is cancelled. I have a video that proof this behavior.http://screencast.com/t/w2YwDGmWCg
1
vote
2answers
47 views

Fetch posts from current week (Sunday to Saturday)

I'm trying to fetch posts from current week. <?php $args = array( 'date_query' => array( array( 'year' => date( 'Y' ), 'week' => ...
0
votes
1answer
47 views

wp_insert_post not working fine

I asked my question on stackoverflow but I did not get any answer, may be because it's the question related to Wordpress.So I am asking it here. I am using wp_insert_post function to insert my posts, ...
1
vote
1answer
51 views

How to remove images from showing in a post with the_content()?

Trying to learn more about creating my own themes and not using any plugins I wanted an ability to display all the images in a post excluding the thumbnail in my single-foobar.php file and I can do ...
0
votes
1answer
28 views

How do I get thumbnails?

Today I set up my Wordpress blog I used the hueman theme I looked at my posts page And there were blank images with cameras in the middle of them So I guess there thumbnails How do I get them?
0
votes
0answers
16 views

hide image or text in full text (only in shortpost)

i need to put image or text only in shortpost and when user click read more and see full post dont see image or text in shortcodes anymore i need this only for some post : i want to put a preview of ...
-2
votes
2answers
108 views

CSS code for “inserting a custom post divider” after each post

I want to add a custom post divider to separate my posts. I'm using the Enfold theme in WordPress.org. I've searched for the answer to my question but I don't understand the coding language. I ...
0
votes
0answers
20 views

Get post titles shows on single posts

I want to display this link lists in "single post" only. How to do this? add_action( 'genesis_before_footer', 'radiolink_unit', 1 ); function radiolink_unit() { ?> <div id="languagelinks"> ...
0
votes
2answers
38 views

Call Web Services on post first publish

I want to call some web service when i publish a post. I want to add a checkbox so as to decide whether to call or not call after publishing. I have found the code to call both REST and SOAP web ...
0
votes
1answer
49 views

Show related posts based of current ACF field name in a single page post (a loop within loop)

I have a single page where I display my current post. Within the post loop, I wanna display another loop inside that shows 3 other related posts by title that share the same text as the current post ...
0
votes
0answers
35 views

How to add validation / error message while add/edit custom post

I am trying to add error message on custom field in custom post save action But my validation not working. Check my code below. add_action( 'save_post', 'save_event_meta_data' ); function ...
1
vote
1answer
34 views

Are posts updated or built from revisions + autosaves?

When editing a post in the admin I see records being added to the database to document my changes (here is part of the hooks I'm logging): ... http://local.dev/151-autosave-v1/ clean_post_cache ...
-1
votes
1answer
20 views

How to make diferent post formats for different pages?

I am making a word press theme. I want different post format of blog page and category page! Here is an example of what i am trying to say http://zeequotes.com This web site have different post ...
1
vote
0answers
28 views

Add a custom meta box in the post options that loads some html code in the header

I run a blog that is built in the format - Logo - Nav Large Image + Email Optin Form Content / Sidebar Footer Now I want the large image and email opt in form to be optional. Right now, what I ...
1
vote
2answers
75 views

Get a custom field of all posts on current blog page

I am trying to get a custom field value from all posts listed on current blog paginated page. Not sure if it's clear, let me explain it more. On blog index page (or on second page of pagination) I ...
0
votes
0answers
16 views

Run php code when user clicks button in plugin's meta-box?

I added a meta box to the publish entry page. I want to add a button so that when the user clicks it the post is sent by email, for that I need to run a function that get's the $post object when the ...
0
votes
0answers
18 views

Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?

I have the following problem with featured tag posts I have a page of a website in wich I want to show only the posts that have setted a specific tag (using the loop). So in this page I have put ...
2
votes
2answers
183 views

Why declare $post globally?

I'm new to Wordpress development and am seeing examples everywhere that have a line to declare the $post variable explicitly via: global $post; But I've tested my uses without that line and it ...
0
votes
0answers
13 views

Why I have this strange behavior when I try to exlude the featured post from posts visualization?

I am quite new to WordPress theme development and I have a strange behavior with this custom theme on which I am working: http://lnx.asper-eritrea.com/ As you can see in the home page I have 2 areas ...
0
votes
1answer
34 views

Custom post types related to same custom post type?

I have custom post types product. I want to create related products from same custom post type (product). The user should be able to select posts (products) just as a user selects a category(or more) ...
0
votes
1answer
154 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 ...
5
votes
2answers
173 views

“coming soon” placeholder blog posts?

I have a page set up with six posts per page with two rows of three posts. If I only have one post up, I would like the other five to have "placeholder images" letting the viewers know that more posts ...
5
votes
1answer
246 views

Allow user to “edit_others_posts” to save only, not publish

I want to add a couple of editors that can edit_others_posts, but I do not want them to be able to publish others posts, only save the post by clicking on the Submit for Review button. How can I do ...
0
votes
0answers
51 views

Why doesn't my WordPress page show the most recent post?

I was wondering if someone could help me with the following. My news page on my WordPress website doesn't show the most recent blog post, which I want it to do. The code I have is: ...
0
votes
0answers
49 views

post_row_actions for custom post type

I'm using this code to have a duplicate post function in WordPress Admin. However, when I add the filter for a custom post type, like this: add_filter( 'directory_row_actions', ...
0
votes
1answer
81 views

When sending a newsletter -not with wordpress- the server has 100% cpu [closed]

When sending a newsletter (not with wordpress, but with another external newsletter campaign tool) to 3,298 recipients, we have unique opens: 155, the server has 100% cpu from too many httpd instances ...
0
votes
1answer
57 views

Get postlist for each category using query_posts?

<?php $cat_name=array('Breaking News Stories', 'Call-out', 'Featured Story', 'Standard Stories'); $count=count($cat_name); /*Get category_id by its name*/ for($i=0; $i < $count; $i++) { ...
0
votes
0answers
34 views

Wordpress Author Posts Review After Every Change In The Same Worpress Post

guys pardon my english, I am new to wordpress & I have been trying to set up a wordpress website for product reviews where new users will submit their reviews for the product/products. New user ...
0
votes
0answers
17 views

How does one change the posts database table of a site?

I am currently in the process of developing a mobile site to accompany a site that I have been operating for a while. I came up with the idea to use multisite to create a second site with a ...
0
votes
2answers
28 views

Post title is not showing

<div class="text_area"> <?php if ( have_posts() ) { while ( have_posts() ) { the_post(); the_content(); } // end while } // end if ?> <div ...
4
votes
2answers
98 views

How do I create a link that will always show the latest post?

If I want to create a link that will always show the latest post how can i do that? Lets say I have three post types and there are three links with posts names (like a nav list) to those post types. ...
0
votes
1answer
40 views

How to show an entire post content and not also the excerpt?

I am pretty new in WordPress theme development and I have the following problem showing posts. You can easily understand what I mean opening this link: ...
0
votes
1answer
23 views

Displaying content of single post

How I can display content for a single post? My code: if (is_single()){ get_header(); get_sidebar('left-article'); render_article(); get_footer(); } In render_article I call ...
1
vote
1answer
55 views

Future post ID not showing

I'm attempting to send an email notification when a scheduled post is published. I've tried quite a few different ways. I receive the email but the id (and other random details) are not published with ...
0
votes
1answer
98 views

query post limits

function posts_limit_fn($limit, $query, $custom_limit = ''){ if($custom_limit !== ''){ return $custom_limit; } return $limit; } this piece of code is executed into an AJAX ...
0
votes
1answer
23 views

Is there any way to tell when wp_postmeta has been updated?

I have a website for a client, where users can vote up or down certain things on a leaderboard. The up vote is stored within wp_postmeta as a field. What I'd like to be able to do is see what the ...
0
votes
1answer
35 views

How can I group posts by date on frontpage?

For example; 20 September 2014 Post 1 Post 2 Post 3 19 September 2014 Post 1 Post 2 Post 3 18 September 2014 Post 1 Post 2
2
votes
2answers
65 views

Where is the old post permalink slug stored?

I published an article with permalink slug: http://domain.com/writing Then after publishing, I changed the permalink slug to writing-lorem. Now, whenever I visit /writing, it redirects to ...
2
votes
1answer
47 views

Limit function to specific post category

I have a function that wraps images in a custom div. It's placed in functions.php and modifies all posts. I'd like to know if there's a way to only apply it to posts in a certain category. Here's ...
0
votes
0answers
34 views

unwanted redirect on saving custom post type / custom post not saving

I've added (or at least attempted to add) a custom post type that has a custom meta box allowing a file to be attached to the post. This function has been spotty at best, allowing some files to be ...
0
votes
1answer
38 views

Add category attribute to custom recent post shortcode

I have a recent post shortcode to display a custom post. Everything works fine so far. However, I would like to add a category attribute so I can specify which category to display. My working code is ...
2
votes
2answers
73 views

Get user's most published categories

I am working on listing all users similar to the Users page here on SE. When listing each user, I want to add their 2 categories they have published most into. All categories are within Posts. ...
0
votes
1answer
67 views

How To Remove Certain category Posts From the Blog Page

I'd like to know, Is there any ways to remove certain category posts from the blog page. Actually, I own a technology blog and I'd like to implement free software directory or marketplace in my blog ...
0
votes
0answers
16 views

Limit categories visible

How could you limit the categories displayed for a certain role when adding a new post? I would like to only list a few categories, but would rather not prevent them from seeing these categories ...
0
votes
1answer
50 views

How to modify specific parts of a post content in WordPress

I'm trying to insert some custom code in each post in Wordpress, provided that it complies wit certain conditions. My problem is that the content needs to be added in an specific location that is not ...
0
votes
0answers
17 views

Determining the table that posts belong to in a multisite setting

I am currently running a multisite and I would like to display posts from other sites in a site. To do this, I wanted to use AJAX so that when I click on the post it does not get redirected to the ...
0
votes
1answer
57 views

is_page() and is_page_template() not being differentiated

I need to rearrange how my comments are displayed depending on the page template. My posts and standard pages are displayed in in the middle of the screen, and thus need to share the same comment ...
0
votes
0answers
16 views

Submitting a post with no title or content gives success message “Post Published”

When you add a new post in WordPress and don't fill in anything then press publish, you get a success message saying "Post Published!" I believe this is because of the auto-draft feature in WordPress ...
5
votes
2answers
269 views

Passing a hardcoded page/post ID into `get_post`

I see people using this to pull in page content on their home pages, remove specific categories from archives etc.. e.g. $post = get_post( 5 ); Someone suggested this was bad practice. Why is it ...