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
13 views

How to exclude same meta key value while post

$argz = array( 'post_type' => 'episode', 'tax_query' => array( array( 'taxonomy' => 'episode_tag', 'field' => 'slug', 'terms' => array( $title, ) ) ), 'meta_query' => array( array( '...
0
votes
0answers
12 views

Copy a page between site in multisite network

Currently, I'm trying to add a function code to copy posts and pages between sites in my multisite network. the code looks like this: add_filter( 'bulk_actions-edit-page', '...
0
votes
0answers
31 views

My page shows some other content in WP

I have developed a WP site which is running in production Nabby Studio. Here Under Photography->Travel the page is showing some other content while the URL is ok. Original I don't know what is ...
0
votes
1answer
30 views

Would Gutenberg be considered a PlugIn?

I believe Gutenberg is the default editor in WordPress. Would it still be considered as a plugin if it is installed in WordPress by default and no option to remove it? I assume plugins are able to be ...
0
votes
1answer
17 views

Query to fetch custom taxonomy along with post title

I have more than 20000 posts and want to filter post based on taxonomy and name which should display the post title ,taxonomy, name,id using MYSQL query.
0
votes
0answers
15 views

website menu is not opening on a single click

i have created a site through wordpress and i am not able to open menus of my site through single click in the same tab. The only way i can open the menus are by right clicking and selecting open in ...
0
votes
3answers
46 views

(solved) getting post author's user role

we can use $user = wp_get_current_user(); if ( !in_array( 'administrator', (array) $user->roles ) ) to get the user role of the viewer. but i want to ignore who views. i want to get who writes ...
1
vote
1answer
15 views

Display multiple custom taxonomy values on single custom post types page?

I can't seem to figure this out, I have tried and looked at multiple forums posts with example codes but nothing is working for me. I have wordpress and a custom post type called videos-on-demand. ...
0
votes
0answers
12 views

Related post not showing table of content

I have squaretype themes and this themes use built in table of content. My question is how to change related post to show excerpt not table of content words?
0
votes
0answers
12 views

Run function on Add new post button

I have a php function for populating some fields on the edit post page. I want to run this function when the user clicks the Add New button on posts page. Or maybe create a new button to run my ...
0
votes
0answers
15 views

Search results with pagination not working

I've got a news page with a search bar functionality. On this page I want a user to be able to enter a term and the contents of that page will be updated depending on what the user has entered. I don'...
0
votes
0answers
10 views

Field with xml data on edit post

I have an xml file, where I have already process the data and I have let's say an array with the values that I am going to need. What I want is somehow to create a button (or a field) on the edit post ...
0
votes
0answers
8 views

Add an author bio made in Adanced Custom Fields in the author archive page

so I created an author bio using ACF, I needed it to appear in the archive for that same author. The ACF bio has a similar name at the end of the URL of the author archive. What I want to do is make ...
0
votes
0answers
20 views

Enable/Disable Comments In Frontend

I'm using the WPUF plugin so every user can post articles from the front-end with a form provided from the plugin. I would like to make a feature for the optional choice to let the post author disable ...
0
votes
0answers
15 views

One Taxonomy Shared with Multiple Custom Post Type

My code below is for Wordpress registering multiple custom post type sharing the same one taxonomy. The taxonomy and CPT are registered successfully, however it shows the tax at the second CPT only ...
0
votes
1answer
24 views

How to display custom field in product description?

I have a custom field such as "_additional_description", I need to display it at the end of the product description, but only if the product is simple. Thank you for your help
0
votes
0answers
24 views

How to find an orphaned page

I'm having a problem with WordPress improperly dealing with slugs due to what looks like an orphaned post competing with an active page. I'll try to explain: I originally created what I thought was a ...
1
vote
1answer
70 views

Update Post Meta for a logged in user

I have created a form which collects information which I want to update a post with. The code I have works great, but instead of updating a post for the user, it creates a new one. Not sure what I am ...
0
votes
0answers
45 views

My post permalinks are redirecting to the post archive page for some reason?

I updated my permalink structure so that my posts were prefixed with /stories/. So in Settings -> Permalinks: Custom structure: /stories/%postname%/. My post permalinks updated correctly in the ...
1
vote
0answers
26 views

How can I get the media inside a post?

I’m new to WordPress, so please forgive me if my question is not clear or vague. I did a lot of research, but I didn’t figure out how to do the trick. I’m developing a Xamarin application for Android ...
0
votes
1answer
27 views

How to disable WordPress from automatically changing “x” to multiplication symbol “×” when typing numbers that also contain an “x” between them?

I simply want to be able type, for instance, "7x12 house design". WordPress, however, automatically changes x (alphabet) to × (<- this is a multiplication symbol special character): &...
0
votes
0answers
31 views

Show custom fields in Post Grid

I have created custom fields for my posts and I want to show them in the post grid. Here is a picture of where I want to add the custom fields to be shown How can I do that? Do I need to use code? ...
0
votes
0answers
8 views

How to offer a non-paginated alternative version on paginated (single) posts or pages?

@ll; I'm hoping this is not a too stupid question; I tried googling for solutions and found none. Paginating longer posts sometimes makes sense to break them down into contextually coherent sections; ...
0
votes
0answers
15 views

Move just the posts from Joomla to an existing Wordpress

I am re-building a website that is currently hosted in Joomla. I don't want to copy the entire joomla site over because the current layound / information architecture is poor and I have to redo it, so ...
0
votes
1answer
37 views

Display a list of users who have viewed the post you are viewing

How would I display a list of users who have viewed the post you are viewing?
1
vote
1answer
15 views

How Display Posts on category

I had a problem, I converted an html template to wordpress, now I want a section Category Enable to display content using categories Does anyone know the solution and code? iam use a code and not work ...
0
votes
0answers
19 views

Not adding a new post?

I am trying to add a new post via the front form. This is how it looks: I insert the form in the right place via get_template_part, here is the form itself: <form class="consult__form-q&...
0
votes
0answers
17 views

Add class to global $post

I added this code in order to customize the password protected page. I was able to add classed to most of the elements but I need to style the page title. How can I add a custom class to the $post? ...
0
votes
2answers
127 views

Add custom fields to post programmatically

I want to create some custom fields that will be able to show to a default wordpress post. I don't want to use the ACF plugin. Is there anyway to do it programmatically? Thanks
0
votes
0answers
7 views

how to add more partition as post [duplicate]

The post in WordPress consists of a title and a description. I want it to consist of more than one description, such as three descriptions
0
votes
0answers
11 views

update_post_meta broke url value

I'm having a problem, i have a post meta key, its value is a url like https:// .. like this but now if I pass the value to update_post_meta its saves it as "p" I check the wordpress codex ...
0
votes
1answer
16 views

How to get post image caption by index

I have multiple images in WordPress post, each image has different caption. I want to get the image caption by the image index, but I can't figure out how to print the caption. Here is what I have ...
0
votes
0answers
14 views

Prevent the automatic URL linking added in last update

Since one of the recent WP updates, all URLs in my post contents are now magically converted to clickable links using some obscure Javascript function on page load, and I can't find a way to disable ...
1
vote
1answer
67 views

Get posts by multiple ID's (query)

I try to get multiple post by ID. For this I created an array for p but I get only the post for the first ID. <?php $args = array( 'p' => array('206', '189'), '...
0
votes
0answers
7 views

How to change Gutemberg preview URL via functions.php

I should change the preview URL link on Gutemberg to get the admin to immediately view the article which has the URL of each article with this form: https://website.com/hkdr/category/#post-slug Does ...
0
votes
1answer
23 views

Wordpress hide post from custom post-type on a single page

Initial situation custom post-type (projects)[projects.php] <?php namespace main_theme\ext\posttypes\projects; function post_type() { $labels = [ 'name' => _x( '...
1
vote
0answers
18 views

Wordpress comments not appearing in blog posts, likely because of Redux template. Could I fix this with a plugin that adds a comment form as a block? [closed]

Although I'm comfortable with coding I'm quite new to website building so please forgive me if I'm using clunky or inaccurate terminology. On my Wordpress website I installed the Redux plugin. It has ...
0
votes
1answer
26 views

how can sort my column

How can I add order? add_filter('manage_articles_posts_columns', function ( $columns ) { if( is_array( $columns ) && ! isset( $columns['post_views'] ) ) $columns['post_views'] = ...
0
votes
1answer
14 views

Right way to store a large set of similar information on website? [duplicate]

I want to add a list of companies' information to my website and I want to display the list in a page. Then by clicking on each company, user can see more information about that company in its ...
0
votes
0answers
20 views

How to remove the icons corresponding to “by” (author) and “date” from posts?

I figured out how to remove the author and date data from posts, but the corresponding icons still appear. What file or function should I edit to remove those? Update: I've figured out how to hide ...
0
votes
0answers
9 views

How to display category names on the Blog Page(Post Page)

Hi everyone I hope your doing well, I'm having trouble on how to display the category names on the Post Page or my Blog Page, could anyone give me an idea on how to display the category names. Here's ...
0
votes
0answers
5 views

how to display count of total posts and for every category and having possibility to filter between dates and user

Hello i use simple plugin that count numbers of posts for every category and total but i was stuck in how to display count of posts between to dates and with authors. <div class="wrap posts-...
1
vote
1answer
10 views

What part of template to edit to remove category name from the top of posts?

In the “Twenty Twenty” template I cannot figure out how to remove the display of category name(s) from the top of posts.
0
votes
0answers
7 views

Changing the current Post when loading single.php file

I need the single.php file to be able to load a different Post (Into the POST object) and to consider the new Post as the current post. Example: Current Post ID: 755 Select Random Post ID: 748 Load ...
0
votes
1answer
16 views

Featured Story Shortcode not outputting content

So I'm trying to get a shortcode working where it calls the posts in the featured story category but I'm having issue getting it to output even just the title from the post. There's no error on the ...
1
vote
1answer
19 views

how do I get a specific post from a post with a subcategory in WP

I'm trying to do a project in WP that has subcategories that belong to certain categories and those subcategories have N posts. In a certain area of ​​the project I have to play some specific posts ...
0
votes
0answers
50 views

How to create preview link of draft post with slug

In Wordpress, the Draft post preview will have the below link: mysite.com/?p=2000&preview=true But I want to custom this link to slug/permalink like: mysite.com/my-category/my-post-slug?preview=...
0
votes
0answers
10 views

How to remove the summary table appearing in my wordpress post

When I create post, there is summary table appearing at the bottom with the page modified info, how to remove it from post. Please help.
1
vote
0answers
10 views

Is it possible to change post id for an already added menu item in Wordpress?

In Wordpress is it possible to change a post id of menu item (page) that was already added into a menu? Maybe via some custom function? Our menu is pretty big and i'm searching for an option to save ...
0
votes
0answers
7 views

Customize (or create) the Add new post button

I am writing a plugin and I want to customize the add new post button (or create a new button) so that it can create a new post with some values prefilled based on the url. Is it possible?