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
2answers
52 views
+50

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
2answers
16 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
6 views

Display post from category choosen by user only

Upon Registration, I will ask user about their interest say " did you like chess , football , cricket, Mathematics etc etc.. user will choose few options from their.. after that, on the blog page ...
1
vote
0answers
8 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
12 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
711 views

WP Database generate content for post_name column

I ran a query that deleted all content in post_name (used for SEO-friendly URLs) column. UPDATE wp_posts SET post_name = '' I thought that WordPress would automatically populate new ones if I update ...
0
votes
2answers
643 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
1answer
799 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
1answer
19 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 ...
1
vote
1answer
25 views

How to limit posts by category

I was wondering if there is a way to make this code limit by category. In other words, if user A has already published 10 posts in category A then he can keep the new ones as drafts in category A or ...
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
1answer
23 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
2answers
19 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

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
2answers
1k 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
0answers
9 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
12 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
2answers
31 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 ...
0
votes
0answers
9 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', ...
-1
votes
0answers
23 views

WP_Query - Bug with multiple post types

I'm creating a WP_Query, and I need it to get multiple post types, and it's working REALLY strangely. I have 3 post types: 'equipo','accion' & 'publicacion'. And my code looks sth like this: $args ...
0
votes
0answers
10 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
7 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 ...
1
vote
2answers
2k views

How to run a function when post is edited or updated using publish post action?

I want to run a function A() when a post is published and function B() when the same post is edited or updated. For this, I found publish_post action which is triggered whenever a post is published, ...
2
votes
3answers
4k views

Counting words in a post

How can I count words in a post? Something like the one displayed just below the post? Can someone please show me the code for getting this. I have been searching everywhere.
0
votes
1answer
663 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
1answer
15 views

Get post slug and match with menu item slug to change css

I have a custom vertical menu based on posts of a specific category. I want to match the slug of the menu item with the slug of the current post to apply css. Specifically, I want to change the ...
0
votes
2answers
575 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
1answer
3k views

Count posts for pagination

I'm doing the pagination for a web. < Previous (pagenumber) Next > is easy, already done. But now I need to add a selector to go to a page directly (ex: to page 7), to do so, I need to know how ...
0
votes
1answer
34 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
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
0answers
9 views

Wordpress: posts and categories not created by me but visible online [closed]

i have a little problem, i see on line page with url composed of my site name / category and post which I have never created and do not see in the control panel. This post contain more comment with ...
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
691 views

Get first comment link on the post itself

I have this function and a link to a post: <?php foreach ($results as $id) { $post = &get_post( $id->ID ); setup_postdata($post); <li><a <?php href="<?php ...
0
votes
0answers
6 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... ...
4
votes
5answers
3k views

How to disable Uncategorized category URL?

I would like to disable the Uncategorized public URL (i.e. /category/uncategorized), since I'm not using post categories and already have the posts list with pagination on the main Blog posts page. ...
1
vote
1answer
26 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:...
1
vote
2answers
1k 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
1answer
870 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 ...
6
votes
2answers
29k views

Get first post from wp_query

How can I get the first post from a WP_Query result? $connected = new WP_Query( array( // Arguments )); // This doesn't work.. echo $connected[0]->post_name;
0
votes
1answer
618 views

How to change the publishing date of each posts?

I need to set the publishing date of many posts with the post date (the creation date). I know that I can do it editing the single post and changing the Published on value but this procedure is ...
0
votes
1answer
1k views

WP get_permalink Return Wrong URL

I have custom post type named: easytask, and the following code is shortcode from plugin to retrieve data from the custom post above ( easytask ). function easy_shortcode( $attr ) { // Shortcode ...
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
5answers
2k views

how can i allow users to view their own pending posts in a front-end page

i want to allow users to view their own pending posts in a front end page but when i access the links created for pending post in the database the links doesn't work until the post is approved If I ...
0
votes
1answer
716 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
1answer
16 views

MYSQL: Create SQL query to search for string and replace

I need to delete a malicious string from 2176 fields following a url redirect hack. I'm pretty vanilla at SQL so some help is much appreciated. I have MYSQL ClI or PHPmyAdmin available to me. The ...
2
votes
3answers
3k views

Change WordPress post-state in Admin Area

Im wondering if it's possible to add custom post state's to other pages? Like Frontpage and Blog I mean the black text: --Voorpagina (Frontpage) I have tried this in functions.php. add_filter('...
0
votes
3answers
36 views

Notification when visitor is on specific WordPress Article

I am desperately attempting to find a way to get an alert when a specific article on my WordPress is visited (and no, I will not be flooded by emails, the code will be used temporarely) Being new to ...
0
votes
1answer
818 views

LinkedIn Share Post Button

Hi there I have been having trouble with a LinkedIn custom share button. My theme didn't seem to provide one and I like this theme so wanted to create my own. I have gotten as far as getting a window ...

1
2 3 4 5
114