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
2answers
21 views

'posts_per_page' => '10' does not show any post

everybody, I have created a custom_post_type; function create_post_type_veranstaltungen() { register_post_type('veranstaltungen', array( 'label' => __('Veranstaltungen'), 'public' ...
-1
votes
0answers
26 views

Best way of deletion of old posts

I have a few sites that I wish to slim down. The sites have been active for a long time and there is really old post data that is no longer relevant. I wish to delete those (older then 3 years) and ...
0
votes
0answers
6 views

Posts being overwritten

I run a multi author Wordpress installation and recently posts have started to be overwritten when users are submitting new articles. The previous posts show in revisions rather than being a new ...
0
votes
0answers
17 views

WordPress Starter Content: can't access the created posts

I'm having a big pain with starter content feature of Wordpress. At the moment I'm using the hook customize_save_after to get the posts, using the normal function I use to get posts get_posts. It's ...
0
votes
0answers
9 views

Missing content on page, seems to have happened recently but latest revision date says June 2018

Our front office recently realized one of our pages was missing all of its content. (Theme, navbar and sidebar, are all intact.) I check the page in WordPress and it shows the latest Revision was ...
0
votes
0answers
9 views

What plugin do I need to add a slideshow to a post? [on hold]

I want to add a pinned post that includes only a slideshow of all the images in a media library. How can I do this? I tried adding a plugin but I was not allowed to add it to a post.
0
votes
0answers
18 views

Recent Posts Loop repeats the excerpt on every post

So, I have this string to show recent posts on my page, but it the excerpt of each post is always equal the first post. what is wrong? see Blog section of my website query_posts( $args ); if ( ...
0
votes
1answer
26 views

Can I create a not clickable post?

My landing page is displaying all posts that have been posted so far. On special occasions (e.g. holidays) I want to post a gif or picture and only a few words (e.g Happy holidays!) which is not ...
0
votes
1answer
34 views

Remove pagination if search returns empty

I made a fix that when the searchbar is empty, it returns 'No results', instead of all posts, but the pagination still shows up. Does anyone know a fix for that? My code search.php: <div class="...
0
votes
1answer
27 views

WordPress generates untitled posts on draft randomly [on hold]

Site generates post randomly on draft. Anyone has this issue before?
-1
votes
0answers
40 views

How to stop Wordpress adding HTML tags to content within API responses?

I want to request Posts and Pages from the WordPress API and render them in my own front-end server. However when I receive responses the content is always populated with HTML tags. I know there are ...
0
votes
0answers
18 views

Add custom taxonomy slug to URL of Custom Post Type

I have a Custom Post Type named "blog", and a Custom Taxonomy named "area" (both setup using the CPT UI plugin). I have also used below code to add the taxonomy slug in the url, so that standard WP ...
0
votes
0answers
19 views

Remove status 'archived' from the default post and page view

I have some page status on my wordpress platform : All, mine, draft,published and ARCHIVED as you can see on the picture below When i go to pages, default view is on ALL pages a got 62 pages on my ...
0
votes
1answer
12 views

Query Post Preview Updates from the WP API?

Is there a way to query previews made to updates of already published Posts via the WP API? For example, I am making updates to a post that has already been published, I click the preview button, and ...
0
votes
0answers
38 views

Adding posts updates previous post

Intermittently adding a new post will cause the previous post to be updated with the new posts information, instead of it being inserted. The the _posts table it looks like a normal revision of an old ...
-1
votes
0answers
22 views

How to display Top rated Posts based on average rating? [duplicate]

I am using custom star rating field in post comment form where visitor rate post with comment. The rating value is stored in comment meta table.I want to display 5 top rated posts based on average ...
0
votes
0answers
16 views

Remove post name of custom WP_Query when using in pagination?

Is this possible? I am trying to get pagination working on my pages and single pages. It seems like it's working, as it recognizes how many pages there are and shows the URL. The problem: the URL is ...
0
votes
0answers
15 views

Custom theme index layout not displayed correctly

I'm making a custom theme that I'm planning to sell. I'm reading some guides about themes creation, I have already experience with wordpress but this time I want to make a nice theme. I'm facing a ...
0
votes
1answer
24 views

How to invoke a HTML custom button based on a HTML dropdownlist menu

I am a WordPress beginner and want a help I created a HTML dropdown list like this: <select name="DropDownList1" id="DropDownList1"> <option value="select you location">&#xf015 ...
2
votes
1answer
51 views

taxonomy list display custom post count

I use $term->count to display post count but it displays the total count of all type of custom posts attached to taxonomy... I just want to display the count of only a specific custom post type ...
1
vote
1answer
39 views

Dynamically update post title in admin page

I have a textarea in admin post page when creating new post, that's title: <textarea id="post-title-0" class="editor-post-title__input" placeholder="Add title" rows="1" style="overflow: hidden; ...
-1
votes
0answers
13 views

SQL: how can do UPDATE on a SELECT query?

how can I do I UPDATE wp_posts SET post_status = 'draft' on this query below: select bad_rows.ID, bad_rows.post_title, post_type, meta_value from wp_posts as bad_rows ...
0
votes
1answer
20 views

SQL query: select duplicate posts - but using duplicate meta [duplicate]

how can I select the duplicate freelancer.com posts? post_id meta_key meta_value -------- ------------------- ---------------------------------------- 1 ...
0
votes
0answers
13 views

Closing Comments conditionally in comments.php

I have a website running shapely as my theme, and I am trying to allow only logged in members to see comments on a post, and restrict anyone but administrators from commenting. I would like comments ...
0
votes
0answers
25 views

how can I use SQL query to find duplicate posts using duplicate meta value instead of post title

I am using wordpress to syndicate RSS feeds and I get a lot of duplicates, however most duplicate plugins only check for duplicated post title. This is no good as posts often have the same title but ...
1
vote
1answer
23 views

Retrieving Author ID in wp-admin area

Currently able to display the post author ID on the frontend with no difficulties. Returning the ID in /wp-admin when editing a post is proving to be tricky. Here's what I have so far: $...
1
vote
0answers
37 views

Removing noindex posts from wp_query

I have a blog website with some old posts and they appear in my "featured" posts section. I put those posts with noindex and but they still show up. is there a way to remove them from wp_query?
0
votes
2answers
15 views

Display a mixed list of posts and media

I have a list of articles on my website. Some of the articles are post types with the "Article" category and others are PDF files uploaded to the media library, also with the "Article" category. I ...
0
votes
0answers
27 views

Remove <figure> HTML tags from all posts

How can I remove tags from all posts on WordPress? I want to remove that tag from my WP feed: mkt-d.hospedagemdesites.ws/wp/feed. I'm using that feed to output posts in an external blog and the ...
0
votes
1answer
21 views

How to make a page both “private” and “password protected”

I’m working on a website which requires these two type of access for each post. (I mean, each post can be viewable in both of these cases) 1- Registered users in specific groups should be able to ...
0
votes
1answer
23 views

Change upload URL by mime type

I'm working on a site that has several hundred pdf files uploaded over the course of a few months. All uploads are organised in the uploads directory by year/month. The client has just decided they ...
0
votes
1answer
35 views

Strange behaviour in Wordpress admin

A few weeks ago, I had to move my blog due to a failing hard drive. It was running on an old server, and I took the opportunity to upgrade to php 7.2, coming from php 5.2 (yeah, I know). Ever since, ...
0
votes
3answers
24 views

How to get WordPress post ID of last visited page?

I need to get the post ID of the last visited page. I am creating a Get a Quote form for products listed on the website. I'd like the form page to have a heading "Quote for PRODUCT X". Product X ...
0
votes
0answers
14 views

limit the writing of articles

Good morning, I have post types called "natura" and I want to limit the number of articles (nature) that a registered user can write. unfortunately there are no supported plugins that do this. how ...
0
votes
0answers
18 views

Post request in add_action [on hold]

I'm quite new in wordpress so excuse me if i miss things. I'm running my wordpress in localhost for now , and i use the WpManageNinja Fluent Form : https://wpmanageninja.com/wp-fluent-form/ . They ...
-1
votes
0answers
24 views

How I can get custom post link by two custom taxonomies IDs

I have in loop list of taxonomies IDs and one ID of second taxonomy example: <?php if( have_rows('taste_category_settings') ): ?> <ul class="product-wrap__category--...
-1
votes
2answers
52 views

how to show all type of author posts in author page (SOLVED)

my site have multiple authors. I need to show all type of author posts in author page that if visitors can see all posts of author when visitied his profile page. this code <?php get_header()...
0
votes
1answer
37 views

How to create page with post content in it?

I have a page that I would like users to remain on. It is like a reference guide. Hence I would like to load post content into the page without the header / sidebar etc. Just the post content. ...
-2
votes
1answer
11 views

Difficulty hiding a span per a body class within WordPress

I am trying to hide a span class as per the CSS class within the body tag. Here is the HTML I am trying to hide: <span class='efav-span'><img src="">Content here</span> And the ...
0
votes
0answers
22 views

Conditional actions by user role

I am making a paid subscription site using Paid Memberships Pro and I need to make some custom actions by user role. All I have found is conditionals for current user, so I figured I can check ...
-1
votes
0answers
12 views

How to load all posts one by one in AJAX mode?

I do not understand how to load AJAX posts. I want messages to appear one after another. It is also desirable to have a loading indicator in percent. I will give an example. In the Regenerate ...
-2
votes
0answers
25 views

Imported posts have (demo) added to titles?

I imported posts, and in the xml file itself it has the correct post titles, but after importing all titles have "(Demo)" added at the end of every title, category and tag?
0
votes
1answer
29 views

How to center all text body in single.php at once?

I'd like to center all of the text bodies (or content body before "read more") of all posts (in single.php) at once with simple (or advanced) code. How can i do that?
0
votes
1answer
15 views

Only show first image in foreach loop

My loop shows a list of values, and underneath them, the post title and image for the value. The problem is that because some values are associated with multiple posts, multiple images show up. I ...
-1
votes
0answers
10 views

A third party recent posts widget for WordPress?

Is there any third party service that provides a script to display recent / related posts widget, without using WordPress plugin that uses server ressources? I didn't find any solutions, except ...
0
votes
1answer
23 views

Show post count in custom taxonomy page

How can I show the post count in a taxonomy page. I tried some codes but I could not get success. I will locate this information on the top of taxonomy page. foreach ( get_the_terms( get_the_ID(), '...
0
votes
1answer
23 views

Top tags with minimum number of posts

I'm getting the most used tags in the 1 day interval and everything works fine but how do I add the limitation to get tags with at least 5 posts and order them by counting? Actual code: $term_ids = $...
1
vote
1answer
20 views

How do I use `posts_distinct` correctly?

I've scoured the interwebs but can't find a good working example or discussion of the filter posts_distinct I'm using Advanced Custom Fields but I don't think that could be the problem. Anyway, ...
0
votes
1answer
36 views

Set a post expiration and delete a post when expirate

I'm trying to create a function that allows me to delete an article when the date of the day is equal or superior than a date filled in a custom ACF field. I wrote the function below that I placed in ...
-1
votes
0answers
11 views

How to lock post screen with a banner right after 10 seconds of visitor duration?

How to lock wordpress post screen with a banner right after 10 seconds of visitor duration? So visitor will visit the post and then 10 seconds of viewing then they will see a banner (content locked) . ...