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

Automatically Paginate Posts after specific number of words

I want to insert <!--nextpage--> (for paginating posts) after a specific number of words, and I want it to keep inserting the tag until the post ends. There is a plugin which does a similar ...
0
votes
2answers
56 views

Auto update post title and slug when post status is changed

I need help. Thanks in advance. I need a function that update post title and slug with some default title + current date when post status is updated from draft to published. I use this one to update ...
0
votes
0answers
22 views

Use audio file like image featured

Attempt to get the url of an audio file in post content to display in the loop of the home page. I can only get it if the file is uploaded at the time of creating the post, but if I go to a post ...
0
votes
1answer
29 views

Worpress search for specific Post Type

I am doing a wordpress site and use a custom post type 'studentinfo'. I want to build a search form and search template that will retrieve only search result from the specific post type studentinfo. ...
0
votes
0answers
24 views

Is there way to update another table when updating wp_posts table?

I have WordPress site with many custom post types. Everyday, nearly 100 posts(posts and custom posts) area created (Some posts are created by different plugins). When a row added to wp_posts table I ...
0
votes
1answer
20 views

How to set class to “current-page” on the currently viewed single post within a CPT

I have a custom post type, "case". I'm currently editing the single-case.php file and in my sidebar I have the following piece of code: <?php $case_query = array ( 'post_type' => 'case', ...
1
vote
1answer
39 views

Need help with category listing!

I'm trying to solve this for a while, but I couldn't get a satisfactory way to get what I want. Maybe it's very simple and I'm just too inexperienced. I need a way to display all the article titles ...
0
votes
1answer
48 views

Show Posts By Custom Field

I’d like to add 2 custom fields to my posts: show_post_on_home_page home_page_posts_order_sequence I then want my home page to show only the posts where show_on_home_page == true, ordered by ...
0
votes
1answer
18 views

trigger email when post is published by someone a user follows

I'm trying to send an email to all users who are following a certain post author when they publish a post. I have this function below, but does not seem to work. a few notes the meta value = ...
0
votes
1answer
28 views

Conflict array_splice on loop and query in widget

I am using the function array_slice to insert two post within the loop in the index. function insert_post_wpse_96347($posts) { global $wp_query; $args = array('meta_key' => 'Caja', ...
0
votes
0answers
14 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
49 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
16 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
59 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' => ...
0
votes
1answer
32 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
30 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
26 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
54 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
35 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
18 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 ...
0
votes
0answers
28 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
33 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
31 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', ...
0
votes
0answers
30 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
15 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
25 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
55 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
47 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 ...
0
votes
1answer
92 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
16 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
37 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
37 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
25 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 ...
0
votes
0answers
22 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
47 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
32 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
43 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
29 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
43 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
23 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
38 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
10 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
67 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
52 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
26 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
47 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"> ...