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

Displaying all posts from other sites on the network on one site

I have a multi-site setup as follows Main Site has no posts Site A has 1 post A Site B has 1 post B Site C has 1 post C What I'm interested in is to be able to treat the main site as an aggregation ...
0
votes
0answers
9 views

Display how many custom posts published in every month, current year and current custom taxonomy

i want to Display how many custom posts published in every month, current year and current custom taxonomy. Example january (20) febrary ( 10) march (33) and etc my code problem is that it ...
0
votes
1answer
11 views

Wordpress 5: prevent link from displaying page title instead of URL

I noticed in one of the updates since wordpress 5 that when I paste in a link to another site it shows the page title as the hyperlink (usually "Home") instead of the URL. I don't want that,...
0
votes
0answers
14 views

I want this. Is there a plugin or a theme that can achieve it? [closed]

I want to have a custom post type similar to posts that can show up as an accordion with a comment section. So basically the visitor can click on a topic ,the content will show up with a comment ...
0
votes
0answers
22 views

Blank featured image in media library only with variable url, but work nicely with static image url

I create plugin who create my posts from content files. My featured images are a list of urls. In CASE n ° 1, I test with a static url, the image is well imported and present in the media library (as ...
0
votes
0answers
10 views

Price shows up double at Product Page

I'm currently working on a shop for myself. I have a question about a single product list. In the image shown the price shows up double. The first one is the regular one from WooCommerce. I looked up ...
0
votes
0answers
5 views

function that gathers all gallery shortcodes

So basically I have a gallery plugin that creates galleries with a specific shortcode. So every time I create I gallery, I first need to create the gallery, and then create a post for it, and the ...
0
votes
0answers
15 views

WordPress wp_postmeta database has grown too big? Any way to find & remove the trash data from it? [closed]

I have a website which automatically posts articles from RSS feeds. I actually had to migrate my site but my migration was always failing at the wp_postmeta database. So my question isn't related to ...
0
votes
0answers
17 views

Post title links appear to be broken

I am troubleshooting for a friend and have very little Wordpress experience so apologies in advance. I am wondering where to look to track down an issue that has cropped up with post teasers. ...
1
vote
1answer
14 views

Is there a way to apply Wordpress categories at the block level?

My use case is as follows: I have a database of videos and video transcripts. The transcripts have had a coding scheme applied to them, so that sections of the transcripts are categorized into ...
0
votes
1answer
23 views

Block editors annoying warnings

When I am trying to edit or add a post/page using block editor, it shows me some weird warnings then they act like they disappear, but when I inspect the page, I see that they are still there. The ...
0
votes
0answers
14 views

Wordpress Admin Post Search extend to one custom field

I would like to extend the WordPress admin post search (so in back-end) in order to look at keywords in post title but also in one custom field. I find this thread interesseting (except the custom ...
0
votes
0answers
33 views

How can I make a post sub link?

I need to create a sub link for each post that will contain specific info about the post that I don't want displayed on the post page. I am thinking of making a link as follows, but I'm not sure how ...
1
vote
0answers
9 views

WP Bakery Load More Button loads the same posts

I'm trying to feed posts in my blog page with a WP bakery widget. I have 8 posts published, but when I hit load more button it loads first 3 posts instead of those in the end. Attaching screenshots, ...
0
votes
0answers
28 views

'Quick View' post

On the Wordpress /wp-admin/edit.php?post_type=custom-post-type, how would I add 'Quick View' link? Where it would display a specific template-part in a modal pop up, perhaps Thickbox.
0
votes
1answer
23 views

Send a review notification email to admin when a post is 12 months old

I'd like to send an automated review email to the site admin whenever a post has been published for more than 12 months. I've tried using the following code but can't seem to get it to work, or ...
0
votes
1answer
21 views

How to hide protected posts from archive?

Im trying to hide protected posts in WP from loop: function hideProtectedPosts( $where = '' ) { if (!is_single() && !is_admin()) { $where .= " AND post_password = ''"; ...
1
vote
1answer
19 views

Number format for wp_count_posts()

I'm trying to format my post my total post count in the header of my site. I have the number in there but would like it to format with the commas eg 1,500 not 1500. I know this is probably really ...
0
votes
1answer
16 views

How to limit wordpress the_excerpt() dynamically

I'm trying to limit WordPress post excerpt and I've tried some ways to do it but all of them was not the stuff that I need, to say concisely I want to limit post excerpt with a number that I use ...
0
votes
0answers
8 views

In Wordpress, how can I get the error log to see a postID of a page on the load of post.php?

I have tried using get_the_ID(), global $post; error_log(print_r($post->ID,true)), the_ID() and I cannot the post_ID of a page on load in WP. I have added: add_action( 'load-post.php', 'myFunc' ); ...
0
votes
0answers
13 views

I want to change the post status when the user click on preview

I want to change the status of the post from "draft" to "publish" when the user clicks on the preview button, then make a URL call and change the status of the post back to "...
0
votes
1answer
123 views

posts_per_page displays only 2 posts instead of 4 posts

I have a wordpress/php code as shown below in which I am trying to pull latest 4 channels at Line A in the code below. function get_latest_channels( $instance_id = false ) { echo $instance_id; ...
0
votes
0answers
17 views

the wp_post_update isn't working all the time

When the user clicks on the preview I want to change the status of the post to "published" if not published and then reset my cache in my landing. Then after that, I want to revert the post ...
0
votes
1answer
23 views

Create a post automatically if search result has zero results

I'm developing a site where people can search phone number(s), the most complex part is that i want to create a post automatically when someone search for a specific number if that phone number yield ...
0
votes
0answers
40 views

How to add a sorting dropdown to archive pages?

I'm using Twenty Sixteen theme with a custom template for archive pages. What I'm trying to do is to add a sorting dropdown in those pages, like in the attached image. My code skills are very basic, ...
0
votes
1answer
25 views

Register post status, exclude from searches

I am trying to register a new post type to hide post in searches but still allow for the post to be seen by url. function reg_ghost_status(){ register_post_status( 'ghosted', array( 'label'...
0
votes
1answer
137 views

Wordpress won't save any post

my issue is similar to the one addressed in this question (WP won't save changes in post (any) Long story short: all of a sudden 3 wordpress install stopped working. I type a post, hit "save ...
1
vote
1answer
20 views

Hide wordpress field if data is empty in post!

I'm using this code to show my field: <?php echo '@ ' . get_post_meta(get_the_ID(), 'Author:', true); ?> When I add a field in my posts it shows it with no problem but for posts that I don't ...
0
votes
1answer
21 views

How to WP_Query() from multiple blogs and order them?

Dear Wordpress community, my job seems quiet hard now. We have a blog for articles and another for videos and I now have to produce a list of it, ordered. Paginatedly. This is what I tried: ...
0
votes
0answers
25 views

How to manually insert related posts anywhere in the posts?

I am new to WordPress. I want a widget/plugin for inserting related posts anywhere I want in my post content. I already have tried so many plugins and unfortunately I failed to find something I want. ...
0
votes
0answers
10 views

Post shows up in database, not in dashboard, screws up other posts in the loop

I'm pretty new to WordPress development and I'm really not sure what's happening here. I've created a new category called "Advertorial" and my goal was to loop through it with a WP_query and ...
0
votes
0answers
10 views

Ajax sends me back my home page as a response

Good morning all, So, I try to do a request with ajax and everything is going fine up to this point: In the frontend, Ajax sends me my home page as a response when I am logged in as a subscriber, i.e. ...
0
votes
0answers
10 views

Wordpress ACF passing a variable as a value into args array

I'm trying to create a dynamic posts layout. In the backend, I have a field where I enter the slug of the post collection I want to pass in. The $subfield value is recipe. For some reason, when I ...
0
votes
1answer
21 views

Inside Array - “unidentified index” error with “prepare was called incorrectly” despite not calling the prepared statement with wordpress [closed]

I know that there is a very old answer that details unidentified index but using the methods there I can not figure out how to make isset work with the code I have. It is below but doesnt solve the ...
0
votes
0answers
13 views

How to Best Create Separate Subscribers and User Experience

I use a Bluehost (hosted) version of Wordpress 5.5.1 with Genesis for my blog (recipe and faith posts). I use the Mailchimp service for my email subscribers. I want to create a separate community (...
0
votes
1answer
35 views

Find Site ID From WP_Post

Background I am writing a migration tool that can move (copy, then delete) posts from one site on a multi-site network to another. I want to correctly separate concerns, and from that point of view it ...
0
votes
1answer
13 views

blog post not accesible on click [closed]

im just developing a web page with the gutenbiz theme and im changing a lot of the features through the elementor webpage builder, i have my blog page set as a blog but the post im editing them on the ...
0
votes
0answers
8 views

How to make Feature Image required for a Particular Template

For a particular post, I use a specific template (Story template) to display it. And any post with this particular template should have Featured Image. I am using this snippet code to check if the ...
0
votes
0answers
13 views

Is there anyway I can call the year once?

Hi everyone I hope you have a great day, I was wondering if is there anyway I can call the year once?. I really don't know if its possible to call the date once cause mine keeps on repeating calling ...
0
votes
1answer
14 views

I want to add the 10 most recent posts under a parent category on the main menu

I have two parent categories in my nav menu to act as separate blog pages. I would like to display the 10 most recent posts from each category underneath in the same menu. I have been searching and ...
0
votes
1answer
17 views

Auto inserted strange characters in wp post

I am facing a strange error on my site. Whenever I publish or update the post, some of my content just replaced by other random characters. Here is an example post : Original Content: त्यसमा पनि प्रति...
0
votes
0answers
15 views

How to fetch courses in all languages in WordPress?

I have a query which fetches English courses only. How can I fetch all the languages courses? I am using WooCommrce with LearnDash. public static function list_courses() { global $post; ...
0
votes
1answer
20 views

Featured image error after importing blog posts

I exported blog posts to an xml file from a WordPress website and then imported them to another. I moved over all the images in their correct folders via FTP and then used a plugin to register them in ...
0
votes
1answer
16 views

Show chart in post using data passed as custom field

Say I have a custom field in my posts that contains data formatted like so: 10, 20, 70 (the values differ from one post to another). How can I display a chart on the blog post with this data as, say, ...
0
votes
1answer
35 views

WP_Query: getting posts where custom field exists

I'm trying to get posts that all have a custom field named webinar, but I just get all posts. Here is what I have: $args = array( 'showposts' => -1, 'post_type' => 'post', ...
0
votes
2answers
30 views

Find most used words in post titles

Is there any technical way to search post titles and return the results of the most used duplicated words in them? I.e Three articles in total: The quick brown fox jumps over the lazy dog A brown bag ...
0
votes
1answer
11 views

Post template not applying on theme (potentially rendering as Page template)

I have a Post template, when I select it in the Post options, it saves, but doesn't apply the template on the frontend. Any ideas why this is happening? The posts in question are in the default posts ...
0
votes
0answers
12 views

Wordpress Sticky Post Count “Fix” Breaking Pagecount by 72 pages!

I have a permanent sticky post on my front page and have implemented the code (pasted below) into my functions.php file to stop it adding an extra post to my post count on the front page (it's a grid ...
0
votes
2answers
32 views

Reinstall Wordpress while keeping attachments

I have a Wordpress installation that I want to reinstall. However, I also have in it several uploaded files (.doc and PDFs) that are linked by external sites. They are not used in any of my own pages: ...
0
votes
1answer
15 views

Blog Post On Home Page Displaying Page Published Date Not Post Published Date

I am displaying the latest post from my blog on a custom home page template but the date posted for the post is pulling through the date the homepage was published not the date the post was published. ...

1
2 3 4 5
112