Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [posts]

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).

0
votes
0answers
7 views

Redirect 301 link wordpress

Hello I have the problem if you can help me looking to fix it and I do not know how to search on the net it is possible to be automatically redirected without having to manually redirect 301 to each ...
0
votes
0answers
3 views

WP meta query: multiple date compares if datepicker is not null

I am trying to build a meta_query which will return all posts that have at least one of their datepicker value greater than today. If the value of the datepicker is null then I don't want to be ...
0
votes
0answers
15 views

Avoid Cookie from removing old notifications

sorry guys i'm newbie with WP, How can i avoid cookie from deleted old notifications! How can i keep all of them until expiry comes or click on Hide button. I don't need to remove the old ...
0
votes
0answers
11 views

How to show No Post Found when a user has not posted anything yet

I am using Wordpress 5.0 By default, when a logged-in contributor click "Posts" or "All Posts", a list of his posts are shown. But when he has not posted anything yet, clicking "Posts" or "All Posts"...
0
votes
0answers
23 views

Automatically populate custom taxonomy with a value from a custom field

I'm working on a real estate website, and right now we have a feed importing new regional listings automatically (RETS feed). Certain fields in the 'properties' post type that comes with the real ...
0
votes
1answer
14 views

New Post bubble

How can I add a bubble that says "new content" to all posts within the last week? I have looked at all available solutions but they only appear to be for menu items. thanks in advance.
0
votes
2answers
24 views

Administrator Posts

I'm trying to prevent anyone in the Editor role from editing posts made by an Administrator. The Editor's can edit each others posts, just not an Administrator's. Is this possible? I've tried the ...
0
votes
0answers
17 views

Set Cookie for New Post Published - Notifications bar

sorry i'm newbie with WP, I found this snippet on Stackoverflow, It working very well, but how can i get all new notifications of all new posts published, I don't need to remove the old notifications, ...
0
votes
0answers
9 views

Dashboard and Front End working but Edit Page/Add Page give me a blank page

My WPLMS site and dashboard are working normally. However when I go to the pages and go to edit a page, it takes me to a blank page with no content and no error message. Editing course content ...
2
votes
1answer
40 views

Show all posts in sidebar in single.php

Wordpress 4.x Why does the loop.php only show the current post in the sidebar when I view a post in single.php? I have: Post One Post Two Post Three If I view "Post One" (single.php), the sidebar ...
0
votes
1answer
25 views

wordpress function for trending now posts

There are many websites that have trending now widgets of sections on the website that shows the trending blog posts currently on the website which are blog posts that are currently being requested ...
0
votes
0answers
8 views

How can I make the excerpt for a post be the featured image?

I am migrating a blog from blogger (ex blogspot) to wordpress and am looking to take each post's featured image and show it in its excerpt. So, how can I set an excerpt for a post to show the post's ...
0
votes
1answer
14 views

Delete all drafts?

This is a common query to delete all post revisions: DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) WHERE a....
0
votes
0answers
10 views

How to remove deleted posts from google results? [closed]

I had some sample posts on my wordpress site which I deleted and now have started writing new actual posts. But when I google myself, the posts I deleted are there in the results. The new posts I ...
2
votes
1answer
16 views

Export posts manually selected by end user (not logged in)

For an intranet project, I'd like to have not logged in users be able to manually check posts (with checkbox in front of post title on archive page) and be able to export some predefined data about ...
0
votes
0answers
20 views

Featured posts reordering without plugin - Newspaper theme

I am using Newspaper (child) theme where the 2 carousels display the 11 featured posts (first 5 in the main carousel and the following 6 in a secondary carousel). We used to use a plugin to reorder ...
0
votes
0answers
20 views

How to properly get the wp_postmeta.meta_value of a custom post type in specifics?

In a RDMS with the following query I try to get postmeta.meta_value of the post with custom post type points. To identify which key they belong to I made a case when. This query returns a greater ...
1
vote
0answers
11 views

How do I retrieve then print the currently viewed sub categories?

I am building a 'course-like' WP site, without the use of any particular 'course plugins' and for this, I need to be able to show all the sub-categories in the sidebar for that particular course. ...
0
votes
0answers
11 views

How to create page in admin panel. that show pending post list

I want to create new page under posts menu, that just show pending posts list. I create page under post, but i dont know what should write in function add_action('admin_menu', 'my_theme_menu'); ...
0
votes
1answer
34 views

How do you update post date (year only) in a separate custom field?

I would like to update all my posts with a custom field that stores the year the post was published. The "year" value will obviously be retrieved from the post's date meta data. I will then use the ...
0
votes
1answer
47 views

Sync All Post Type Tag

I have a few post types in my website. Is it possible that all post type using the same post tag? For example: PostType A have a "Apple" tag. PostType B, PostType C, PostType D use PostType A "Apple" ...
1
vote
1answer
48 views

Side effects of Script and Iframe in post

I am writing a post on HTML. Afcorse the post will have Codes in it. So for showing results in the post, I am taking help of JSFiddle, by embedding results of the code. JSFiddle gives two methods for ...
1
vote
1answer
14 views

How do I unlock a post programmatically?

I can use wp_set_post_lock to temporarily lock a post so that only I can edit it. I can use wp_refresh_post_lock to refresh that lock. I can use wp_check_post_lock to check whether a post is locked. ...
0
votes
2answers
21 views

Sorting post by custom field and category

I want to sort posts by a meta value in a custom field. Basically I've added a field called 'date_event' and want to sort the posts by that date (stored as YYYYMMMDD). The only working example I have ...
0
votes
1answer
19 views

My wordpress based site is publishing the same post twice

I have no clue how to go about troubleshooting this. To explain, I am seeign two symptoms Any social media autoposter is publishing the same link twice Wordpress is triggering two emails about ...
0
votes
2answers
29 views

News post with multiple permalinks? When opened from different page

I’ve got a question. Maybe it’s something existing and I don’t know the name. Or maybe it’s something custom. I’ve got a post type for news. The news posts have categories. These are some examples of ...
0
votes
1answer
22 views

WP Query - Posts Per Page not working in combination with category__in

I'm not sure whether it's a bug or i'm doing something wrong, but it doesn't seem like posts_per_page works at all when using category__in. My query is below, even though I've set posts_per_page to 1,...
0
votes
0answers
9 views

custom post to “add email” has white background - not admin

I am trying to develop a plugin that runs in the admin space. It is very simple. I'm using WP_List_Table to display a list of the items in the db. That works perfect. I have an "Add" button on the ...
1
vote
2answers
60 views

Checking is user author of number of posts?

I have this function... $user = wp_get_current_user(); if (( in_category('Locked') ) && in_array( 'subscriber', (array) $user->roles ) ) { /* Is subscriber, is in category Locked, has ...
-1
votes
1answer
31 views

custom post type single page template not working

I created a page portfolio and select template Portfolio Template My portfolio page does not access the template-portfolio.php file. In which also includes content-portfolio.php in template parts ...
0
votes
1answer
18 views

Show post content and title in diferent divs using WP_Query using a loop

im trying to display the post title and post content of posts in diferent divs using a loop to iterate the posts in $the_query, how can achieve this? <?php $the_query = new WP_Query( '...
1
vote
1answer
40 views

How do I use <picture> element instead of <img> tags in WordPress post content having webP support?

I am developing my custom theme and trying to figure out how to modify the default code for WordPress image inserted into the post content, so I could add support for webP format and have it within &...
0
votes
2answers
56 views

How do I add a custom body class to the admin area of a page?

I tried with this code in functions.phpof my website's child theme. add_filter('admin_body_class', 'custom_body_class'); function custom_body_class($classes) { if (is_page(8)) $classes[] =...
0
votes
0answers
18 views

How can I change the style and size of font of Blog Title?

I want to change the font size of my blog title and also make it bold and change the style, But there is no option when I select the title of blog page. How can I change that ?
0
votes
0answers
10 views

Open source my blog posts

Can anyone know about a plugin, or could think about a way to open source my blog posts? I would like to enable users to suggest their changes to my post.
0
votes
0answers
13 views

Hide posts from all posts lists [duplicate]

I just start a new blog, and I want to import all my old posts. But I want to list them in a separate page (named 'Archive') and not show them in the main page, 'Recent posts', most commented and so. ...
0
votes
0answers
16 views

How can newlines be filtered from post content?

How can newlines be filtered from post content using: <?php add_filter( 'the_content', 'filter_function_name' ) ?> or, if better, removed at the time the post is published or updated? Any ...
0
votes
0answers
20 views

WordPress displays HTML Special characters while sharing post on Social Networks

I am developing a WordPress website. In wordpress, when I tried to share post to any social network, it displays special characters like "&#8217". For example, if post content is this, "To me ...
0
votes
1answer
21 views

Wordpress 302 Redirect to Random Product/Post/Page

I'm trying to add the ability to redirect a user to a random product/page/post url similar to example.com/page/random which would redirect to example.com/page/oneofmany. This question is not ...
0
votes
0answers
16 views

Display posts with datas of custom database table

I think the title is not very explicit, but I don't know how to name it ! Well, I'm totally stuck on a question: To make it simple, I work on a site referencing places and their information. These ...
0
votes
2answers
45 views

How to disable edit post option 12 hours after post publication for contributors?

I've tried to achieve it by using snippet from years ago, but it doesn't seem to work. I need to make it work with Gutenberg (WP 5.0). Is it possible to make it work?
0
votes
1answer
18 views

Post data across Wordpress sites

I have two Wordpress sites. When I click on a link on Website A (the link is a country) I would like it to navigate to Website B. Website B would then display a list of results based on the link ...
0
votes
0answers
10 views

New posts aren’t part of data pulled through query/array

OK – loads to unpack here: 1 – there is a template that we have (PHP) that works for all of our pages except for 1 new one (ruled out anything being wrong with the template [hopefully]). 2 – the page ...
0
votes
1answer
16 views

Images showing up in Post Editor, but not in Published Post

I am trying to add three images by just inserting them into the post here: http://www.ihts.nl/wie-wij-zijn/ Although I can see the images perfectly in my Media Library as well as in the post editor ...
0
votes
1answer
16 views

tribe_get_start_time displays the current date and time on other post types than tribe_events

i am displaying posts selected by an ACF relationship (with object format) on a page, including custom posts like tribe_events. I want to display the date and time on the tribe_events posts, but not ...
0
votes
2answers
21 views

Flickering sidebar when scrolling page [closed]

I am an amateur WP developer building a site for my wife :) I am using Helium theme and the site is in RTL direction. I have a right side bar. After making some changes by changing the main page ...
-1
votes
1answer
18 views

Query posts by custom fields (object post)

As described in ACF documentation, here is the way to find all posts where a custom field called ‘color’ has a value of ‘red’. $posts = get_posts(array( 'numberposts' => -1, 'post_type' ...
0
votes
0answers
27 views

How do I add a custom field?

I am completely new to WordPress and was just playing around with it to figure out how it works. I stumbled upon custom fields for posts, and read that it should be possible to enable them in Screen ...
0
votes
1answer
9 views

how to put post customized in page

can someone help me please? for example i decide to open web about cooking one of my pages is about posts of how to cook.... the post is full details,but i wanna put only one picture of it (just like ...
0
votes
2answers
26 views

how to bulk add one line in the first paragraph of all posts

I want to add a sentence at the beginning of all posts of content directly into the post_content WordPress database. How do I? Either through the function.php or the MySQL command.