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
0 answers
4 views

Inside post image title has been posting as a post title on my main post page

I create a page for every post I want to publish on my Wordpress site, and on my main newsletter page I post every single post by its title, mostly all my posts page has an images, but recently I ...
0 votes
1 answer
894 views

My posts page is missing the page title

I cannot for the life of me figure out why a title is not showing up on my blog page. I want to be able to have a title and maybe even some descriptive text below instead of just jumping into the ...
0 votes
1 answer
624 views

Make sticky post with FacetWP

I have WordPress posts in combination with Advanced Custom Fields and FacetWP for filtering. WordPress has an option to make a post sticky, I did this and nothing happenend so I tried to change my ...
4 votes
5 answers
5k views

Is there a way to disable the sticky posts feature?

I want to turn this off as I have a custom ordering process using custom fields.
0 votes
0 answers
4 views

How to add portfolio category post count in main navigation menu?

Can you guys can help me on how to add/show the post count for portfolio category in main menu. eg: People (10) | Nature (12)
3 votes
1 answer
769 views

How to display related posts from parent category

I am using the following code to display the related posts but it is showing posts for that category only like brand showing brand posts only. What I am looking for is if I select any of the posts ...
1 vote
1 answer
628 views

Multisite: Can't Post or Create Categories

I created a multisite with two sub-sites. This is the structure: example.com - root ----- > example.com/site2 ----- > example.com/site3 Everything works fine, except for posting on the ...
2 votes
1 answer
623 views

Double count view in archive.php

I'm having a hard time using this snippet I'm getting double views each time the post is queried. This is in my functions.php file: function getPostViews($postID){ $count_key = 'post_views_count';...
0 votes
1 answer
655 views

How to Remove HTML Elements from Post Excerpt?

I am Using the Following Code and want to remove HTML All Elements. <?php $exerpttext = substr(get_post_field('post_content', $post->ID), 0, 300); if (!empty($exerpttext)) { echo $exerpttext.'......
0 votes
1 answer
1k views

Work and Display a Custom Post Type as a normal Post

I've created some Custom Posts for my Wordpress page and I can work fine with them. I can create a new one, edit it and display it in "archive-custom_post_type_name.php" and many more things. I can ...
3 votes
1 answer
628 views

Change post format using custom field

I'm creating a theme using the CF Post Formats plugin. But I've run into some trouble I don't know how to solve. Here's what I want to be able to do: Create a new standard-format post Enter a url ...
0 votes
0 answers
15 views

How to solve DOM Issue- A large DOM will increase memory usage, [closed]

I have a site My Website 1: https://mksapk.com On the index or home page I am showing new and old posts by using Kadence theme. Once i check speed of site on pagespeed site i am facing DOM Size issue ...
0 votes
1 answer
1k views

How to get all post titles starting with numbers and symbols?

I want to get all posts which are starting with a number (0-9) or symbols, in a list. I managed to get it work for letters, but this one is harder for me. Can someone help me out please? I tried ...
0 votes
3 answers
2k views

Assign a Post to a User

1 - I have a CPT, with 10 posts. 2 - I have 10 users Q : How can i assign a single post from my CPT, to an unique user ? -> Each user must see only it's assigned post (Each post will be assigned by ...
0 votes
0 answers
11 views

I am using the query block and what I want and see on the editor page is not the same with the actual results

I want my posts to be just as the first picture on a grid formation but when I save and view the page it shows otherwise.
0 votes
2 answers
2k views

How do I show the post title if an advanced custom field hasn't been used?

I've got an archive page for to display custom post types. Within the WP_Query that displays the custom posts types I want to display an ACF (Advanced Custom Field) or, if the user hasn't filled out ...
0 votes
0 answers
8 views

I have a blog and want to prompt the user to select a category they like and have that select a random blog post

I'm building a website that shows the best dj sets. As a feature I want to be able to ask a visitor for an artist/genre they like, which are the same as my categories/tags. Either through a dropdown ...
0 votes
1 answer
1k views

Blogposting Schema & Structured Data without plugin

I would like to add blogposting schema markup so each new post is automatically optimized for rich data. Some code on the web is messy and needs updates per each post, also plugin is not best option ...
2 votes
2 answers
54 views

Is there a way to change the default post template selection for a specific category?

When we add the new post,the default template is selected. I want to change the default selected template to my custom template automatically before publishing or saving the post. Here's an example: ...
0 votes
1 answer
29 views

warning wp session

my website is down and has this error Warning: Private methods cannot be final as they are never overridden by other classes in /var/www/vhosts/katalytes.com/httpdocs/wp-includes/class-wp-session-...
5 votes
3 answers
13k views

How to get Images included in Post

is possible to get images added to a post programmatically? I am working on custom template (my first) and I need to display Images added to a post in specific way.(first image as title image and the ...
1 vote
2 answers
1k views

Get user categories with most posts in it

I am trying to make a query to take first 3 categories with most posts per user, but no luck so far. This is where I am now: SELECT DISTINCT(terms.term_id) as term_ID, terms.name, terms.slug, posts....
13 votes
3 answers
10k views

Keyboard shortcut for updating a page or post?

What is the keyboard shortcut key for updating a page or post? It could save me a lot of time as rolling down a page draft is time consuming.
0 votes
1 answer
644 views

Redirecting wordpress search query to archive page

My sincere apologies for asking this question as I am quite certain that this is a relatively easy topic, unfortunately my many hours of searching got me no satisfying results. I do not mind ...
7 votes
2 answers
4k views

Change label of title field for posts in the backend

I am trying to add some HTML to the title label in the backend of WordPress. Attempt 1: I am using the following (simplified) function: function change_post_titles() { global $post, $title, $...
1 vote
1 answer
5k views

Update post meta within save_post action

I'm currently trying to update a post's meta value within the save_post action. The problem with this is that it gets overwritten immediately. I've been banging my head on this problem for several ...
0 votes
2 answers
740 views

Is it possible to have dynamic post id # in add_menu_page()?

I use the add_menu_page function in my custom theme builds but when I export my local copy of the site and import it in the production site some of post id numbers change and I have to update this ...
0 votes
3 answers
2k views

Cannot publish posts, but can create new pages

I am building a site on WordPress. I can't publish posts: when I attempt to do so, the site just hangs and then I get a time out page. However, I can add new pages without a problem. I have tried: ...
0 votes
2 answers
3k views

New Posts and Pages Won't Save

I haven't been able to save posts for the last week. When I try to add a new post, I can add the title just fine, and I can type the post, but none of the post text saves when I click Save Draft. I ...
0 votes
1 answer
26 views

How to get post ID after removing that post?

Is it possible to get WordPress post ID after removing that post? I have found out that I need that ID to remove the page from the site map, but I do not have the post ID, becuase I have deleted it. ...
1 vote
1 answer
4k views

How to filter my search in post if contains a word in title, content or excerpt?

I'm trying to filter one search, and I'm interested in know if a word is inside the title, the content or the excerpt but without luck and finally I'm stucked. $args = array( 'post_type' =...
3 votes
1 answer
2k views

using slug instead of ID in admin edit post url

In Admin, is there any way to use a slug instead of a post ID# within the URL that takes you to a post's edit screen. So instead of: http://example.com/wp-admin/post.php?post=5562&action=edit ...
0 votes
1 answer
36 views

I want to add category slug in posts url

I want to add category name or slug in the post url. I have tried by changing the permalink structure but it didn't work. Can anyone guide me on this?
0 votes
2 answers
2k views

Start post pagination at 0 instead of 1

Is it possible to start post pagination count at zero instead of 1? I want the URLs to be like this: ../page (Foreword) ../page/1 (Chapter 1) ../page/2 (Chapter 2) But by default the URL is not ...
0 votes
0 answers
11 views

How to update a lot of posts on my WP site with additional content?

i need to have some functionality to be able to update a lot of posts on my WP site with additional content. The original content of the posts should be left untouched. Also this should be run on ...
0 votes
1 answer
54 views

What is the proper use of guid for images in wp_posts?

I understand that guid is a unique reference for a post, whether that post is a post or an attachment. When it's a post, I think guid is self-evident. But what is the correct formulation/destination ...
1 vote
2 answers
5k views

How can I use wp_query to show all product data using just the products ID?

While on a product page (product 1), I am trying to pull through information about a different relevant product (product 2). To create a kind of 'you may also like' list of products. I am trying the ...
0 votes
2 answers
2k views

Dynamically Create Posts Via XML File

I'm new to wordpress/php and I'm trying to create new posts dynamically through a xml file. The xml I'm working with is this one. The file get updated periodically during the day in a FILO fashion (...
0 votes
1 answer
755 views

Posting a comment redirects admin/users to blank page

I have looked a lot on this problem on forums and tried out a few of the solutions but nothing seems to work for me. When I try to comment here: http://www.chicitout.co.nf/crochet-lace-skater-dress/ ...
0 votes
0 answers
19 views

Post pages are redirecting to the 404 page in wordpress

In my root folder, I have installed WordPress. Now I have created a resources folder in the root and installed WordPress in that too. I am able to login into the resources admin panel and created ...
0 votes
1 answer
1k views

WordPress - Update all existing posts at once

Is there a way to cycle through all existing, published posts on a WP site, that will replicate pushing the "update" button on every post one by one? This would be a one time event. I have a site with ...
0 votes
1 answer
1k views

Get current user array with post string

I need to get 10 current user fields and pass the field values to a post string. The post string is expecting certain label names for each value. Example - post string expects 'firstname' => '...
0 votes
1 answer
759 views

Bulk Attach Or Insert Media To Post Without Opening Post Editor

How to create a custom panel inside wp admin dashboard where we can insert media to specified posts in bulk? Here is the illustration: As shown on the image above, it list all available media on the ...
0 votes
1 answer
1k views

Send the post id to a front end edit post form

I try without success to send the post id to a page where a front end edit form is displayed by a shortcode and to insert the title of that post in the form. Where am I wrong? Any suggestions? The ...
0 votes
2 answers
56 views

WP_Query post_tilte search in posts table

Here is my array which I am trying to get "apple" keyword in post table but it can't work like I want. Please let me know what is wrong with my array? Array ( [paged] => 1 [...
1 vote
2 answers
2k views

Publishing failed. The response is not a valid JSON response

I am using wordpress 5.4.2. I get this error when trying to add a new post. I changed my permalink to Post name sample http://localhost/wordpress/sample-post/ How should i change my .htaccess My ...
0 votes
2 answers
968 views

Inserting image into post content - Front End

This is the php I have for a form which creates a post with thumbnail. I want to know how to add the uploaded image to the post content as well. Tried a few things, but they didn't work. if(isset($...
0 votes
1 answer
691 views

How to Save settings of custom tab product page in admin side in a database?

I have following code : <tr> <th><?php _e('Custom Stock Message'); ?></th>...
0 votes
0 answers
23 views

How to delete posts with incorrect status

This is a weird one. By mistake, I created some posts using WP Webhooks + Make where the post_status was incorrectly set to "published" instead of "publish". Now, for some reason ...
3 votes
1 answer
4k views

why does HTML Tag not working in Post and Page

Though this is not a programming related question but I am facing a bitter experience with this WordPress problem. the problem is HTML Tags are not working in my website. See the images

1
2 3 4 5
119