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

Filter by
Sorted by
Tagged with
0
votes
0answers
21 views

Post template with breadcrumb needs to show page navigated from

I have a custom post type, Reports, that contains many categories (custom taxonomies). These posts are organised in menus on different pages. So a menu page named "Best Reports" would have ...
0
votes
2answers
34 views

Wordpress query undefined offset in loop

I created a query with arguments see blow. On the page I see an error in a loop Notice undefined offset 1 Notice undefined offset 2 Notice undefined offset 3 and so on... $args = array ( '...
0
votes
0answers
24 views

Yoast breadcrumb URL shows category instead of the page

I have setup Yoast breadcrumbs in my category pages en posts inside that category page. Category page: home/diensten/ Post page: home/diensten/support/ When I want to navigate back from the support ...
0
votes
0answers
14 views

WP User Frontend Post Form glitch

WP User Frontend Post Form somehow shows a completely messed up UI of a form. It is supposed to look like this but instead - when I visit the page - this is shown What is the issue here and how do i ...
0
votes
0answers
21 views

Updating post count on admin page after pre_get_posts filter

After the pre_get_post filters out the past posts, the number of posts above the page is still the original count of all posts (custom post types). How can I update that number so it'll correspond ...
0
votes
0answers
28 views

Display post according to parent categories and child categories

I got a task of developing an Informative site and I have some issues in displaying information about products according to categories. I have added the product details as post and need to display ...
0
votes
0answers
17 views

Not to repeat similar post

welcome everybody ... How can I not repeat the post except for the author This is my code: <?php $you_likes = get_posts(array( 'post_type' => 'recommendations', 'meta_query' => array( array( ...
0
votes
0answers
22 views

Disable Wordpress URL by ID number

I have a post URL like this: https://domain.com/cpt/post-item/ which has a post_id: 1234. But if I change the URL to this: https://domain.com/cpt/1234/ or this https://domain.com/cpt/?p=1234 or this ...
0
votes
1answer
11 views

Post Image Gallery After Content Function messes with other content

So i made a blog with posts, and I used this code to display a shortcode gallery under the content in a post. The problem is, now the "All Posts" Page has no posts in them. And I think its ...
0
votes
0answers
11 views

Embedding Post Editor Into External Site

I want users of my spring boot site to be able to write/edit posts from the spring site itself using the Wordpress editor. I have found that there are ways to use the Wordpress API to post the content ...
0
votes
0answers
27 views

Change featured image lightbox image size to full size

So i made a blog with posts with image galleries, and i would like to make the featured image lightbox full size instead of the smaller size it is now. I already did this with the images in the ...
0
votes
1answer
34 views

Very complex post query

I need to create a very complex post query, but I don't know if such a query can exist, or if I have to write PHP code to combine the results of two different queries... Let me please describe the ...
0
votes
0answers
5 views

Gallery Shortcode after every single post content

I have a blog with posts, and i want to return my gallery shortcode after the post content. I want '$after_content' variable to be the gallery shortcode. functions.php: add_filter('the_content', '...
1
vote
1answer
20 views

How can i display gallery shortcode output under Post text

so I have a shortcode for a gallery I'm using in the Single.php file for the single post pages. The problem is that the gallery only shows either at the top of the page, or at the bottom. I would like ...
0
votes
0answers
7 views

Custom Post type editing: where has my publish button disappeared?

I run a Wordpress website with a lot of Custom post types, where I customized the interface so that contributors can easily do what they need. When editing a given post, widgets appear on the second ...
0
votes
0answers
11 views

Add a current user/author post to sub menu

I wish to add a current user's custom post to a navigation sub menu. I have a custom post type called Member. Each custom post will be assigned to different users where they can add and edit their ...
0
votes
0answers
17 views

how to do wordpress ajax post

I'm using Wordpress code snippet plugin to write my javascript codes. as I'm pretty new to wordpress coding, I tried doing an AJAX post that saves some data to a database table I created (inserting ...
2
votes
0answers
20 views

How do I add a reusable block to a programmatically created post?

I am using WordPress for documenting a project. To lighten the workload, I plan to run a script to build a big old index of things. For example, "files that call function_x", or "files ...
0
votes
1answer
12 views

How do I add /blog/ on my permalink without affecting the portfolio project types permalink?

I already know that you can add /blog/ on the custom structure under permalink settings. However, when I do that, it also applies to the permalink of my portfolio project types like this: domain.com/...
0
votes
0answers
16 views

Add data attribute of post_id for Internal links

I noticed that internal links to other posts have data- * Attribute. One of Post ID. And the other of Post Type. (As in screenshot). The problem is, it's only in the block editor (Gutenberg). And not ...
0
votes
0answers
18 views

How to get Images post ID (to use with Enfold gallery) [duplicate]

I made a blog with posts, and i would like to show the attached images in a post in a gallery in the single.php. But I get this error when opening a post.. A critical error has occurred on this site. ...
0
votes
0answers
12 views

How to make a post parent hierarchy list

I want to do it like on the udemy platform, when I click on the post, sub-posts will be opened as an accoridon.
0
votes
0answers
27 views

Single Post Gallery Using Shortcode

So i made a blog and I would like to put all the images in a post in a gallery/slider. I'm using the Enfold Child Theme so I looked up the gallery shortcode and made this function in the single.php(...
0
votes
1answer
21 views

Change post author without using wp_update_post()

The standard or more obvious way to change a post author in WP is to use the wp_update_post() function, as shown in this question. But I am having an issue, described as follows: // Inside the ...
0
votes
0answers
11 views

How to scroll to post title

How I can scroll to post title? I have front page where I can see latest posts and if user clicks it opens post page and I want it scrolls to title. Because every page I have hero video.
0
votes
2answers
23 views

How to display the custom post related blog by category?

I am using WordPress and I have to show the related blog by category. I have created a custom-type post. I tried the below code but the code is displaying the last category of the post. Would you help ...
0
votes
0answers
8 views

Display post from category choosen by user only

Upon Registration, I will ask the user about their interest say " did you like chess, football, cricket, Mathematics etc.. The user will choose a few options from there. After that, on the blog ...
1
vote
0answers
9 views

Hiding Draft Post In Admin

Does anyone know of a way to hide draft post so that when "All" post is selected, draft post is not included? I tried adding this code to my functions.php file but it lead to an error, I'm ...
0
votes
0answers
13 views

OrderBY meta_key_value including null value

I am trying to do a simple query in wordpress ordered by a meta_value_num of a custom field, the problem is that not all the inputs have a value so it gives me a null value and it does not show very ...
0
votes
1answer
20 views

Please help a newbie with blog page issue?

https://diarmuidoconnorbooks.com/home/?p=1561 https://diarmuidoconnorbooks.com/home/?page_id=1355 The first link is to my post’s permalink. The second is at it appears when you go to the website’s ...
0
votes
1answer
13 views

How do I assign an attachment to a post using only the REST API?

I am able to create a new post by sending a request with cURL against the REST API. That works fine. I am also able to upload files into the media library with cURL via the REST API. The uploaded ...
0
votes
0answers
10 views

want to show post or blog of one(A) wordpress site to another new(B,C,D) wordpress sites , take filter by site name i.e A,B,C Using ready pluggin

want to show post or blog of one(A) wordpress site to another new(B,C,D) wordpress sites , take filter by site name i.e A,B,C Using ready pluggin please suggest ready pluggin or custom code Thanks in ...
0
votes
1answer
27 views

Show metabox value last post excerpt, title and link

I'm facing a problem I can't solve. I'd like to get the excerpt, title and link of the last post containing a particular meta-box button status. For example: I would like to retrieve the last post ...
0
votes
3answers
31 views

How to insert custom text after H1 to all my blog posts?

I'm looking for a way to insert "THIS ARTICLE MAY CONTAIN COMPENSATED LINKS. PLEASE READ DISCLAIMER FOR MORE INFO." after the H1 in all my blog posts (not pages). Is there a way to do it ...
0
votes
0answers
10 views

Posting an article containing mathematical symbols and R code

I have been trying to figure out the best workflow to publish articles heavy in R code and R output and mathematical formulas. I would like to be able to finish the entire report in RMarkdown ...
0
votes
1answer
16 views

WP Forms not displaying,becomming an fatal error

This is what i become after insterting a WPForm in Wordpress Fatal error: Uncaught exception 'Exception' with message 'There is no suitable CSPRNG installed on your system' in /var/customers/webs/...
0
votes
0answers
5 views

How can I prevent users from commenting on a post after that post gets a specific number of comments?

I'm trying to figure out a problem I have. I need to prevent my users from commenting on a post after that post received 15 numbers of comments. In a way I want to set the maximum number of comments a ...
0
votes
0answers
10 views

show it to members when there is a new post

I prepared a code, it works when there is a new post, but how do I show users that it is +1 each time a post is made, and if the user clicks on the list of posts, it will be deleted, then it will ...
0
votes
0answers
9 views

show category list with images of associated posts

any way to display a list of categories with a single image of any post associated with that category? i have this code: $categories = get_categories( array( 'orderby' => 'name', ...
0
votes
0answers
11 views

How to create loop of posts except post ID defined via ACF field

I am creating a custom news page with two columns - 1st column - featured post - using a ACF text field to add post ID to show, ie: 12345 - works fine. 2nd column - remaining news, showing all other ...
0
votes
0answers
8 views

Is it possible to prevent authors from commenting on their own posts?

I'm trying to find a solution to a problem I have but didnt get any luck so far. I dont want my authors to comment on their own posts. But It's okay for them to comment on other authors' posts. Is it ...
0
votes
2answers
75 views

Menu Items disappearing/being empty on save or post edit

I've been having this weird issue on a site for a few weeks now, tried everything I found by searching but still not being able to find a clue of the issue. Whenever I add some items to the Menu (...
0
votes
0answers
18 views

Alt text attributes not showing over portfolio images

I´ve been searching almost all posts regarding this issue but haven´t found a solution for my theme. Maybe there´s a kind expert mind that can support me. I´m using a theme that doesn´t allow updates ...
0
votes
1answer
39 views

Filter Custom Post Type by Category with Ajax

I've used the below tutorial for my WordPress site to add a filter to one of the pages. https://www.youtube.com/watch?v=KRc47o8uDhk&list=PLSeCxQ7f7r87qbYmqXmOAcvoshw1e6ewQ&index=3 It works ...
0
votes
0answers
20 views

how to save data of a new field in WCFM store manager

I added a new number field in store-manager WCFM in the product manager, and now I want to save the value of that field and for that I used the function save_add_product_meta, but it doesn't work... ...
0
votes
1answer
9 views

Show single post child category from a determined parent

I am trying to show in a single post child category from a selected category. For some single post, I have a category that is corresponding to an area. I want to show that category in a special area ...
0
votes
2answers
38 views

Author post count in category

I want to count authors post count in a specific category. How do i do that? I have red this thread here but still can't fiure it out. Count number of posts by author in a category Edit: This is what ...
1
vote
1answer
27 views

Exclude category from

I am trying to exclude a category from <?php the_category(', ') ?> inside my loop. I came across the following code on CSS tricks that says would solve the problem. You add this to the functions:...
0
votes
0answers
26 views

Inconsistent distance between blog post grid on mobile

So i made a blog using a grid with posts, and i tested it on different screen sizes, and on mobile the grid is 1 column width. There is a problem: the width between each post in the grid is ...
0
votes
0answers
39 views

Limit Blog Post Title to 2 Rows/Lines

i recently started creating my wordpress blog, and i would like to limit the title of a post to 2 rows to keep everything organized. I already found a function that lets a limit in amount of ...