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
1 vote
1 answer
30 views

count the total number of comments the user has received for his published posts

I want to count the total number of comments the user has received for his published posts. for example show: total comments of your all posts : 47 Is there a way to do this? Can you help me?
user avatar
0 votes
0 answers
18 views

Count the total views of all user posts published

I have 1 essential questions I want to count the total views of all posts published by a user (login user). for example show: total view of your all posts: 485 Is there a way to do this? Can you help ...
user avatar
0 votes
1 answer
17 views

how to set social icons to product / post template (Auros theme)? [closed]

After installation of the Auros theme, the social share icons are unfortunately not loaded in the product and the post template. It should be loaded like this via the template: Do you have any idea ...
user avatar
0 votes
0 answers
18 views

Custom post grid

does anybody know how to create post grid-like on screenshot with a custom wp-query...Thanks!
user avatar
0 votes
0 answers
68 views

Oops! That page can’t be found

I have designed site juicerhunter.It was going well but suddenly an error is showing: “Oops! That page can’t be found. It looks like nothing was found at this location. Maybe try searching?” This ...
user avatar
  • 1
0 votes
1 answer
21 views

how to find the posts page

I had created the archive.php file and made it to show all posts, also have a sidebar that shows the time line, for example 2022, january 2022. When I click on january 2022 I have a page showing me ...
user avatar
0 votes
1 answer
46 views

WP_Query outputs wrong post in custom post type

So I'm working directly in the Admin Dashboard of my website, below I will explain what I'm attempting to achieve and what issues I'm getting. Here is the code: add_action('admin_head', '...
user avatar
  • 177
1 vote
1 answer
63 views

Get more than one author's posts with REST API

http://example.com/wp-json/wp/v2/posts?author=1 gives me author 1's posts. http://example.com/wp-json/wp/v2/posts?author=1&author=5 gives me only author 5's posts. Is there any way to get 2 ...
user avatar
0 votes
0 answers
24 views

Save / Update meta data as multidimensional array

I need some help with saving my meta data from a post. On the editpage I have the following input fields <input type="text" name="data[color][]" value="red"/> <...
user avatar
0 votes
0 answers
8 views

Need help creating a page that has editable fields

I am creating a new website for an organization that offers writing classes. One of the most important pages on the website is a “class page” which provides the information about a given class (name ...
user avatar
0 votes
0 answers
24 views

page duplication on wordpress that wont stop

I have a super weird Wordpress issue, there is a history of duplicated posts/pages in the database and they even show up in the Wordpress admin backend. here are the facts: on some days, seemingly ...
user avatar
  • 1
0 votes
2 answers
23 views

Adding Text after Post Title based on Category using IF Condition - But not for menu items

Some posts have a more "readable value" even though they are free to read. To highlight their increased reader value, I've managed to get together this piece of code. "Problem" is, ...
user avatar
0 votes
1 answer
29 views

How to show a custom taxonomy in the theme?

I have created a custom post type: register_post_type() and custom taxonomy: register_taxonomy(), but when trying to show the categories made to the post type in the theme single-{post_type}.php they ...
user avatar
0 votes
0 answers
42 views

Generating 10 000 Wordpress posts using PHP and avoiding Server Timeout error

I hope someone would be able to help me. I'm currently trying to develop a plugin which is able to generate 10 000 WP posts, each with different number (basically, 10 000 posts which title is a ...
user avatar
0 votes
1 answer
29 views

Wordpress Query - Display 5 posts (same post type), each from a given tag

We have a news section on our website. We have basically 5 companies giving publications: ('ENEFI', 'dmker', 'megakran', 'otp', 'futuraqua') We would like to list the latest one from each and order ...
user avatar
0 votes
0 answers
15 views

My worpress search page is showing no results

I want to display the publications searched for via searchform.php in the search.php page but it does not work ... The search is done well when I look at the url (ex: New World): http://localhost/?...
user avatar
0 votes
2 answers
51 views

No matching template found when using single.php

I am building my own WordPress theme. I have the front page working. However, when I try to view a test post full of Lorem Ipsum, I get the "No matching template found" error. I have the ...
user avatar
  • 103
0 votes
0 answers
20 views

Create a List of Widgets, where each widget holds three attributes

i have a specific wordpress page, in which I want to add expandable items. So the item has a keyword and when I press it, it expands and more specific text will show up. The styling and setup of such ...
user avatar
0 votes
0 answers
25 views

Why is it recommended to insert JS through the theme, plugin, etc rather than in the post directly?

Say I have a JS script that is only needed to be used in some pages. According to this advice it is recommended to insert it through the theme, plugin, etc, not through the post. Why is that? Is it ...
user avatar
  • 308
0 votes
1 answer
65 views

set post limit at load more ajax wordpress

The site has load more posts functionality using ajax on vanilla javascript. Ajax: postData.append("action", "loadmore"); postData.append("paged", section_posts); ...
user avatar
0 votes
1 answer
46 views

If Post Published Date or Modified Date is 1 Year or Older, Display Notice on Post Page

I need a way to inform visitors if the post published date or modified date is older than 1 year and if so, display a message on the post page. I have added an code to my content-single.php file, but ...
user avatar
0 votes
1 answer
26 views

Edit post & page option does not display on latest wordpress

I am not able to edit the WordPress default posts/pages from front-end. I have tried to deactivate all plugins, check/uncheck toolbar option(from profile) and also wp_footer() function in the file. ...
user avatar
0 votes
0 answers
25 views

How to edit a custom theme?

I am new to WordPress and I started working on a project. I have found a customized theme which I have to change. I have to create a dropdown menu in the navigation bar that shows some subcategories ...
user avatar
  • 1
0 votes
0 answers
9 views

Display default matabox of posts(add category) wordpress

I'm trying to make a custom page that will add posts. And I have a little problem. How can I display adding categories in page(in my template) for a post as in the admin panel
user avatar
  • 1
0 votes
0 answers
8 views

The rank mathe plugin's FAQs are not appearing in my website?

While posting many posts inside my blog, the fax section of the rank forehead is not coming in it. You can see this link Paise Kamane Wala App of mine.
user avatar
0 votes
0 answers
23 views

Can I show category name in url for only one of my categories?

I have several categories in WordPress. I have set the Permalinks in WordPress Settings as https://www.example.com/sample-post/, without the category name. For some reason, I have to show the ...
user avatar
0 votes
0 answers
22 views

Is it possible to get the specific content on the search page?

I am working on the WordPress search. I am using the below code to get the data on the search page. $s=get_search_query(); $args = array( 's' =>$s ); $query = ...
user avatar
0 votes
0 answers
20 views

WordPress posts have a different URL to the index

I'm at a loss here to what I may have missed but the URL structure of my posts (single.php) is different to the one for the blog index (home.php). The URL for the blog index is {DOMAIN}/news The URL ...
user avatar
  • 145
0 votes
1 answer
50 views

How to let a user create a post by submitting a POST form?

So i have the following simple POST form in my home page: <form action="/wp-content/plugins/myplugin/my_create_post.php" method="POST"> <label for="title_given"...
user avatar
  • 39
0 votes
0 answers
12 views

Wordpress Post Block Element not properly parsed with the_content filter

I made a small script which echoes the content of all Wordpress Posts on post_updated, deleted_post and trashed_post actions. add_action('post_updated', 'echoAllPosts'); add_action('deleted_post', '...
user avatar
0 votes
1 answer
162 views

duplicate posts with ajax load more wordpress

I have ajax loading posts on my site when scrolling. The problem lies in the appearance of duplicate posts. I cannot understand why this is happening. Only some posts have duplicates. Here is my code ...
user avatar
0 votes
1 answer
35 views

How to dynamically parse and transform post/page content before displaying it?

I have several posts where part of the displayed content will depend on several conditions. I am thinking on creating a custom html tag. Then, before displaying the post content, the conditions will ...
user avatar
0 votes
1 answer
22 views

Returning data instead of echoing/printing

New to WordPress (and PHP) and am trying to get this PHP snippet to work with the Code Snippets plugin so I can display all media attachments within my post. It is working, in that it shows the ...
user avatar
  • 1
0 votes
0 answers
20 views

Separate top level categories on archive-product.php by meta

I'm trying to edit the top-level products/shop page for WooCommerce, which I know is archive-product.php. I only want the changes I'm making to affect the main level so I'm using an 'if' statement to ...
user avatar
  • 101
0 votes
0 answers
40 views

How to add text before post_excerpt in Gutenberg

I'm trying to edit my plugin to work on the updated version of the website. I have a custom plugin, which worked with plugin Post in Page but not working with the integrated function of Gutenberg - ...
user avatar
0 votes
1 answer
47 views

Cannot create new posts or upload images using media manager

My WordPress website was recently moved from one a shared hosting provider to a VPS setup at Digital Ocean. I provisioned the server myself and have WordPress running on a LAMP stack with Linux Ubuntu ...
user avatar
0 votes
1 answer
40 views

Enqueue CSS on custom posts' backend area

I'd like to insert some CSS on a specific post type's backend area. So not globally. I've found lots of ways to insert it everywhere, but can't figure out how you'd target posts only. Any ideas?
user avatar
  • 21
0 votes
0 answers
26 views

Copy/paste local images not working in Wordpress

This is somehow frustrating. I am ussing the latest version of Wordpress I am running my webpage, and when I need to copy-paste an image from Internet into any of my posts/pages I have no problem. ...
user avatar
0 votes
0 answers
10 views

How can i showcase all my galleries?

i am working on a Website for News. Some Articles will have Galleries and some not. I want to have a site where one can see all of my Galleries and if clicked all Images are presented with and a linkt ...
user avatar
  • 1
0 votes
0 answers
24 views

Rewrite image links from attachment id to attachment link

WordPress is having trouble writing links to attachment pages. Sometimes an image links like this: mysite.com/my-post/my-attachment-page Othertimes an image links like this: mysite.com/?attachment_id=...
user avatar
0 votes
0 answers
26 views

While loop in functions.php outputting the_title() of each post on frontpage

I have the following code on the website: $args = array( 'posts_per_page' => -1, 'post_type' => 'gyorshirek', ); $loop = new WP_Query( $args ); $wp_query = $loop; if ( $loop->...
user avatar
0 votes
0 answers
58 views

Filter wordpress posts without searching the keywords in the post content

We've a courses website where we want to filter posts/courses by the keywords present in the category and/or title. Currently when filtering, the keyword is also being searched in the post content ...
user avatar
  • 1
0 votes
1 answer
71 views

How to import nested categories from XML file?

We're importing an eXtended RSS file generated by WordPress thru the native Importer: Tools: Import in the WordPress admin panel Importing parent posts is straightforward, by defining the respective ...
user avatar
0 votes
0 answers
22 views

Automatic duplicate/copy of post to a related page in WordPress

I have a website about introducing softwares and apps. I created pages and so menus (named by categories). I set my WordPress setting homepage to latest posts. I create posts and give them categories ...
user avatar
  • 103
0 votes
0 answers
17 views

How to customize blog post titles to render a YouTube logo on posts with an embedded video?

I have a variety of blog posts on my site, in some of these posts I have a YouTube video embedded. How can I make it so that for each post that has a YouTube video embedded in it to show a YouTube ...
user avatar
0 votes
0 answers
9 views

Post meta not working

I'm trying to set custom category and post meta but I think they are somehow blocking eachother. $post_tarjousid = wp_insert_post($post_tarjous); $category_id = 22; $taxonomy = ...
user avatar
  • 1
0 votes
0 answers
9 views

Post page overwrite the custom blog page

is there any chance to stop wordpress to overwrite the custom blog page
user avatar
1 vote
1 answer
33 views

Display Ad on Specific Categories

I want to display the ad only in specific categories. Can anyone help me here's the code to display the ad on all single posts/ <?php get_template_part( 'template-parts/ads/below-head' ); ?>
user avatar
  • 15
0 votes
2 answers
28 views

How to identify and hide/remove an element from a WordPress page [closed]

I created my first WordPress website using Elementor and an all-in-one theme called Webify. Since I am new to WordPress and to website design, I've imported a demo website that comes with the Webify ...
user avatar
  • 101
0 votes
0 answers
15 views

How display related post only in Default category on single

I have a website with lot of post. I use 3 or more category for my post. I wanna display post only for the "default category". I try this one but work with all category not only Default. If ...
user avatar