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

The Loop doesn't work when using RewriteRule

I am using .htaccess RewriteRule on my page. When user goes to /news RewriteRule actually loads /?nav=news On that page, I use The Wordpress Loop to show recent posts if (have_posts()) { ...
0
votes
1answer
58 views

Best Way to detect unique posts in wp rest api

I am developing an android app for my WordPress blog. I have some bad trouble to detect and get post. So first I give u a vision from what I am into: I want to get post from past, so I do this: Get ...
0
votes
1answer
24 views

WP_Query offset argument does not work

I want to display all posts starting from a certain offset, my query is: WP_Query( array( 'posts_per_page' => -1, 'offset' => 20, 'cat' => 5, ) ); ...
3
votes
1answer
80 views

WP_Query: Why is sticky post not first item in loop?

I've got a custom WP_Query loop based of meta_value variables: $meta_cat = get_sub_field('category'); $posts = new WP_Query( array( 'cat' => $meta_cat, 'posts_per_page' => get_sub_field(...
0
votes
1answer
37 views

WP_Query() load selected post

I need to load a selected post in a ajax function, I have some problems writing the appropriate query that calls the post i'm pointing <?php $pb_id = $_POST['post_id']; $pb_details_args = ...
-1
votes
1answer
31 views

Custom post page has attributes of latest post [closed]

When you share the custom post page, it shows title, description, author of latest post. Even page ID is from latest post. Does it supposed to work like that? Besides this, it causes many other ...
0
votes
0answers
29 views

How do I put my Blog posts on two or three different pages?

So my site has a static front page and a blog page on my website, but I would like to show my blog on both the blog page and the static front page. Also, I have several pages representing several ...
0
votes
1answer
59 views

Get query result according to merged array

1st query selecting the records that are found $old_args = array( 'post_type' => 'product', 'meta_query' => array( 'relation' => 'AND', array( 'key' => ...
0
votes
0answers
57 views

Post not show after select the category from drop down

I show all my categories in dropdown and want to show all the related post from specific category My code is here <li id="categories"> <h2><?php _e( 'Posts by Category' ); ?>&...
0
votes
0answers
19 views

What is the best way to intercept posts/(topics) as soon as they are added by the user in a Forum in Wordpress?

I need to write a plug-ing for a Forum in Wordpress, that each time a user inserts a post/topic such plug-in is able to intercept the data in the post and then we make our analysis throught a function....
0
votes
0answers
29 views

Get first title post from an author

I want to display first title post from an author on my loop with this code: <?php $number = $count_post; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ...
0
votes
1answer
34 views

Split post title for styling

I need to split up post title and want customize both strings, For example post title is This x That I need to display this title as This xThat. Is there any way to display like that?
0
votes
2answers
33 views

Get total post from an author

I want to display some data from an author on my loop with this code: Avatar <?php echo get_avatar( $q->ID, 255 ); ?> Name. <?php echo get_the_author_meta('display_name', $q->ID);?&...
0
votes
0answers
33 views

Add new nav menu item programmatically

I want to add new nav menu item and in the same time create new page, so my questions are: Is it enough to use wp_update_nav_menu_item() to create new page and new item in existing nav menu? And if ...
0
votes
0answers
17 views

Adding A Title To Post Pagination

I have a really really long post. I am using post pagination ("alt+shift+p" or ""). This works and adds page numbers to the bottom of the post and allows me to add pages, but i want to add a specific ...
0
votes
1answer
26 views

Is it possible to completely replace a post with an action/filter?

Currently I am trying to replace the $post global with another dynamically loaded post in the wp action. However, while even in the templates the correct post data shows when outputting $post, the ...
-1
votes
1answer
57 views

Convert Html5 to Wordprss

I do design a HTML5 template.now i want convert that template to wordpress theme.i was convert main page(Index.php). now i want two page, one for create a section in my theme for blog which show ...
0
votes
1answer
65 views

Get the correct meta_value with get_post_meta

I tried using the function get_post_meta() to get the meta values of my posts. However to my surprise it returns an Array that contains again arrays! So I looked inside the second level array, and was ...
0
votes
1answer
13 views

Surrogate ID for posts, is there an alternative field in the posts table?

I am copying some content between another CMS and Wordpress. I need to keep track of the original Id because I might have to update the copied content in the future. The old CMS will still be used for ...
1
vote
1answer
190 views

Fatal error: Call to undefined function post_exists()

I am using the function in my own class as I am using other wordpress functions in it. I am unable to understand why it is not able to find the function while ide "go to declaration" point me to file ...
0
votes
0answers
28 views

Force WooCommerce product type to be virtual / downloadable?

I'm customizing a WooCommerce store that will only be selling downloadable / virtual products. I need to change the default type of products to downloadable/virtual, so when the admin adds a new ...
0
votes
1answer
64 views

How to change “post_class()” for a custom post type?

I am trying to keep the classes the exact same on my normal (blog) posts, and a custom post type I have called "locations". When I post a "normal post" I get the following classes: class="post-# ...
0
votes
0answers
42 views

Embed handler in custom field

I am trying to implement wordpress function wp_embed_register_handler() into a custom field. Using this instead of wp_oembed_add_provider(), for the urls I use do not offer oembed support. With help, ...
0
votes
0answers
32 views

Update content post and meta-boxes.php

I have "stupid" iussue (for you), but difficult for me. I need to change (on the fly) the post content when I publish or update the post, and I did it simple adding some code to the wp-admin/includes/...
0
votes
0answers
34 views

Is there a way to retrieve post meta data from wp_get_nav_menu_object?

I am trying to integrate flexslider into my theme. I want all my post to default to flexslider post and I want to be able to customize the order of these post/slides using custom menus on the ...
4
votes
1answer
62 views

Post preview mechanism architecture

I'm trying to find how WordPress is dealing with preview posts before publish. I'm entering the edit mode of a post that I want to edit, changing some stuff, pressing preview, and getting the preview ...
0
votes
0answers
40 views

SQL to update custom post field

I tried to update a custom field but I can't to this... I have a custom post that that I used for a fill months. Now I create a new date custom field called "data-edital". On the new posts, I put the ...
0
votes
1answer
71 views

ACF Relationship - Get Parent's Post Object

I've a few post that have ACF relationship field set up : - Post A - Post A1 - Post A2 - Post A3 Post A have a relationship that link to : Post A1,A2 & A3... Post A1,A2,A3 have their own post ...
2
votes
1answer
31 views

Auto set Post to Specific Categories

Assume that I have created following category. Mobile If the post title has any of "mobile","Nokia","Samsung" these tags I need to set that post to Mobile category. I can do it for new posts, I ...
0
votes
1answer
35 views

Hide title in Merlin Theme on posts and pages only

I'm trying to figure out how to hide a post and page titles while on the specific post or page, but NOT throughout the entire site. I've tried hiding the .entry-title class, but that hides titles ...
0
votes
1answer
60 views

Improving WP_Query for performance when random posts are ordered

I have made a new query after I've asked a question about my query_posts code... you guys didn't find that great, so I decided to change that. I made this: $page = (get_query_var('paged')) ? ...
0
votes
1answer
24 views

Extracting a TLD from the content and assign to custom field

I am trying to get the first instance of a TLD in a post and insert it into a custom field. For example with a post: Hi I am Bob. My website is http://bob.com and you can reach me at bob@bob.com ...
0
votes
0answers
8 views

Adding hook when post is submitted [duplicate]

i made a custom taxonomy named project and i wanted to add a validation during the submission of post. I want to check if the post has selected any terms under the project taxonomy. what can i do to ...
0
votes
0answers
46 views

loading wordpress post with ajax in div

I want to display a post with ajax in some kind of modal box which i created. On click on link, the modal is shown (display:block) and the content is loaded. Also a overlay is added. That works great. ...
0
votes
1answer
32 views

Why I can not I use the variable outside my function?

I am writing a little plugin, to extract the post ID and them use it for some queries. Of course if I write: function my_callback_function() { $aa = 'hello world!'; echo $aa; } ...
0
votes
0answers
22 views

Cannot link my WP Post to PDF Enhanced plugin button to generate a new PDF document of the current page

I am trying to get my "WP Post to PDF Enhanced" plugin to generate a new PDF document reflective of the current page I'm in. The issue is that when I'm using the pluging it keeps downloading the ...
0
votes
2answers
132 views

Lazy Load using WP_Query pagination

I've been thinking of using WP_Query's pagination to make a custom lazy loading. is there a way to utilize the WP_Query's pagination for a lazy load? Say for example, I have to load 24 posts in the ...
1
vote
1answer
58 views

Error after upgrading WP from 4.0.6 -> 4.4.2: empty value in wp_post_types['post']

I’m attempting to upgrade a WP install from 4.0.6 to 4.4.2. Most of the update went swimmingly, but I’m faced with a pretty cool error message I can’t seem to figure out: Warning: ...
0
votes
1answer
37 views

issue in wordpress auto delete post and redirect to another 1

i am getting strange issue on WordPress, my site is huge traffic and database. one thing.. my WordPress is updated 4.4.2 all plugins updated. now i get issue when i publish new post most of the posts ...
0
votes
1answer
87 views

Update Post Meta is adding a value to my serialize array

I have the following select values: <select name="vibe_quiz_tags[]" id="vibe_quiz_tags" multiple="" class="chzn-select chosen select2-hidden-accessible" tabindex="-1" aria-hidden="true"> <...
-1
votes
1answer
21 views

Is there any SEO impacts on unattached vs attached images for a post in WordPress?

I usually bulk upload images to the WordPress Media Library and then add them add them in post, it remains unattached. Is there any specific SEO impacts on unattached vs attached images for a post? ...
-1
votes
1answer
57 views

How to force regenerate thumbnails in Wordpress posts?

We recently changed themes. The new theme uses different dimension thumbnails and I was a bonehead and deleted all previous thumbnail sizes. Deleting the thumbnail sizes results in many of the images ...
1
vote
1answer
53 views

Storing posts from query and accessing later via AJAX call

To clarify the above question title, what I am trying to do is create a grid of posts, for which I am displaying a thumbnail of an image that is attached to that post. Then, upon clicking each of ...
2
votes
1answer
32 views

Edit meta data does't work with custom sql

I have a form that uploads posts to Wordpress, and at the same time I can edit things like the meta data afterwards. However using the Wordpress edit_post_data works fine but a custom SQL query won't ...
0
votes
0answers
23 views

add post type support not showing edit author options for all users

Need to allow all users (admins) to be able to edit the authors of a post. Added this to my wp-admin.php in the inc/functions folder but is hasn't worked: add_action( 'init', '...
1
vote
0answers
22 views

Emojis replaced by '?' automatically

I just discovered that all emojis on my site were replaced by the ? char. I saw this on comments and posts. Tables like wp_comments or wp_posts had a utf8mb4_unicode_ci collation before and now, so ...
-4
votes
2answers
32 views

How to var dump urls for all posts

I need to see all urls of all publish blog posts in the site. How can I get this? I want this for redirecting in .htaccess of old site to new site. This needed in anything page of site.The result is ...
0
votes
0answers
7 views

Subpage for custom post type not beeing loaded

A week ago I started working with wordpress. My project is to expand a friends website with a section where she can add offers (e.g. guided hiking tours) in a chronical way. Those offers should have ...
1
vote
1answer
23 views

How to create new post content templates for my users?

I admin a wordpress site for my kids primary school. At the number of editors/contributors is small, but we'd like to expand it. To simplify the uptake for some of the office staff I'd like to have ...
0
votes
2answers
52 views

the_content() stop images being pulled through

I have created a custom post type to pull through the date, title, thumbnail and content, some of the posts have images and the_content() is pulling through those images and I don't know how to stop ...