Questions tagged [posts]

Blogging and other social media activities usually provide mechanisms allowing users to provide content of their own. One such unit is usually referred to as a post.

Blogging and other social media activities usually provide mechanisms allowing users to provide content of their own. One such unit is usually referred to as a post.

973 questions
3
votes
2 answers

Wordpress only post 1 post from each category

I have this site: http://n0rd.no/testing/ where i try to make it so that each podcast get one post on the front-page and not one pr post in the category. I found how do i get only 1 post from each category in wordpress on this site, but cant figure…
Hallgeirg
  • 63
  • 1
  • 10
2
votes
1 answer

One query to get latest 7 posts from each category in WordPress

I'm looking to write a SINGLE custom SQL query to retrieve the latest 7 posts from each of my 6 specific categories of a custom post type. I know how to query custom post types and taxonomies, but my SQL knowledge is limited. I don't know how to get…
Lasha
  • 581
  • 5
  • 9
2
votes
1 answer

Redirecting posts in Wordpress to a specific page

I created a page so that it would appear in my navigation menu. This page would however be my posts page (i.e. all posts would go here) and would also be my front page. I am unable to find anything other than editing the 'Home' in the theme file…
Ganesh
  • 79
  • 1
  • 4
  • 11
2
votes
4 answers

Only displaying a posts selected taxonomy terms?

When using wp_get_post_terms() I can produce a list of taxonomy terms associated with a post. However, I only want to show the taxonomy terms that have been selected for that post. Using the aforementioned function and get_terms() will…
Schwoebel
  • 216
  • 1
  • 4
  • 19
2
votes
1 answer

Display number of posts from a certain category?

How can I display ONLY the number of posts from a certain category ? I want to display only the number without the category name. I used this code wp_list_categories('show_count=1&include=23&title_li='); but it displays the category. Any help…
Bialy
  • 73
  • 2
  • 9
2
votes
2 answers

Paginate through posts of a single category in Wordpress single.php

I have set up a site using Wordpress as my CMS. I am using the site as a portfolio to show off my front-end web dev skills and have another area of the site for a blog. I got around the issue of having 2 blogs on the site by giving posts a category…
James Howell
  • 1,392
  • 5
  • 24
  • 42
2
votes
1 answer

11ty - How to display post tags in my post.njk file?

I've used the 11ty/eleventy-base-blog template and have things working well - but I am trying to display the tags nicely within my post.njk file. At the top of my post (.md) file I have this: tags: ['Tag 1', 'Tag 2'] Within…
2
votes
1 answer

Wordpress, filter pages in Admin edit screen

Is it possible to 'filter' which pages are shown in the 'edit' screen for pages ( http://cl.ly/6nLC ) in Wordpress? I have looked in the action / hook section of Wordpress for plugin developers but I could not find any. What I am trying to…
Matthijn
  • 3,126
  • 9
  • 46
  • 69
2
votes
2 answers

Wordpress Post Sorting?

I to allow my users to sort the list of wordpress posts by Title, Date added, Comments, Rating etc. These will all be buttons or links at the top of the list (kinda like table view sorting) However, I have no PHP experience and only know a few…
Swen
  • 31
  • 1
  • 2
2
votes
0 answers

How to split wordpress posts table

I am migrating my news web site to wordpress, and I have performans issues on wp_posts table, because of the size of posts. Now wp_posts table has around 1,000,000 posts (4GB) and the sql query results are terrible. I made partitions on the table…
General M
  • 21
  • 2
2
votes
1 answer

Summary of pending orders issue in admin backend on WooCommerce 3+

After updating Woocommerce from 2.6.13 to 3.2.6 some custom code that displays pending orders and tallies up the products ordered no longer works. I am having trouble porting the code over as the woocommerce docs I have been locating appear to be…
ComputerGiant
  • 159
  • 1
  • 1
  • 12
2
votes
2 answers

MySQL query to get post_id and feature image URL

WordPress considers both a post and the post's featured image as two separate posts, which seems to make it impossible to create a SELECT query putting the post and post's image URL into the same row, like this: post_id imageURL 100 [URL] How…
rikuwolf
  • 103
  • 2
  • 10
2
votes
1 answer

Custom Post Type & Author not associating, user post count is 0, api doesn't return author in post objects

When Users create custom post types, the author field does not seem to be passed back to WP posts functions. As the title says, I'm creating a user account programatically, and having that user log-in and write a post of custom post_type =…
lakewood
  • 607
  • 1
  • 5
  • 21
2
votes
2 answers

Wagtail - display the three latest posts only on the homepage

I have created a model to show posts on the homepage, but only want the three latest posts to show. Do I need to use pagination for this, or is there a hook I can use instead? I was thinking I could use pagination and just not include the 'next'…
Steve
  • 1,182
  • 1
  • 11
  • 25
2
votes
2 answers

Wordpress search bar outputting only posts titles

I would like to create a Wordpress search bar in PHP, displayed in just one page of my site (I am working on a new theme I have made). As result, the search bar should output only the permalinks (titles) of my posts that are related to the search…
Lolo
  • 125
  • 2
  • 16