-1
votes
1answer
41 views

Pagination 404 on my index.php

I'm trying for days how fix pagination on index of my wordpress site. Pagination work great on category and other archive but doesn't work on my index clicking on the page numbers have a 404. I found ...
0
votes
1answer
52 views

How do I display child post types in the parent post type template

I have a custom post type called airports which uses a template called single-airports.php. I have created a new airport called Gatwick and created a child of this called called Gatwick North ...
0
votes
1answer
32 views

Adding arg to search results page

I want to show future posts in search results, categories, etc. This site says to use the following code: $args = array( 'post_status' => array('publish', 'future'), ); query_posts( $args ); ...
1
vote
3answers
50 views

Unable To Get Published posts using query_posts

I'm not sure why this is not working as its a very simple query. It works when i pull all posts including pending, but not when i want to get posts that are only published. I have a function to get ...
-1
votes
1answer
169 views

Modify Blog Module layout in Child theme

I need to adjust how the featured image is displayed in their blog module. I need to change the display of the Featured Image from an IMG tag to a Background Image. So I can modify the frame (DIV) of ...
0
votes
0answers
72 views

How to prevent duplicate sticky posts

I trying to make a homepage for my Wordpress bootstrap theme which shows the sticky posts in a separate section stretching from side to side and below that I intend to show only 10 posts from the '...
5
votes
1answer
1k views

Some doubts about how the main query and the custom query works in this custom theme?

I am pretty new in WordPress theme development and I'm not so into PHP (I came from Java and C#) and have the following situation in this custom theme As you can see in the homepage I first show a ...
0
votes
1answer
54 views

Show Posts By Custom Field

I’d like to add 2 custom fields to my posts: show_post_on_home_page home_page_posts_order_sequence I then want my home page to show only the posts where show_on_home_page == true, ordered by ...
0
votes
1answer
47 views

Plugin Development: Storing and Manipulating Data That Fits JSON in Database

I am new to Wordpress plugin development but not web development in general. I have a website whose functionality I am trying to port over to Wordpress for a client that needs it in a custom plugin ...
0
votes
3answers
205 views

loop query exclude meta_key with meta_value

Hi I use a loop like this: // show all active coupons for this store and setup pagination $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts( array( 'post_type' => ...
0
votes
1answer
67 views

Does wp_query and query_posts affect website performance? [duplicate]

I've been aware about the difference of wp_query and query_posts. I just want to know what impact does both query methods to the performance of the page? Which query method makes the page load quicker ...
0
votes
1answer
68 views

Display list of custom post type which match taxonomy

I'm trying to add a snippet in my Wordpress sidebar which displays a list of links to posts which match a criteria. I'm using a Custom Post Type cars and a taxonomy car-types and I'd like to display ...
1
vote
2answers
45 views

Posts not showing on page

Can anyone spot anything wrong with this code(see below). No content is showing up on my page. Many thanks in advance. <?php $args = array( 'posts_per_page' => 3, 'orderby' => '...
1
vote
1answer
69 views

Sort by meta key on archive page

I am trying to sort an archive page using a meta key value (which happens to be a Unix timestamp). Currently I have the posts listed on the page by their WordPress creation date. I want to use the ...
0
votes
1answer
14 views

Plugin outputs content of posts unbidden!

I've written my first plugin. The intent is to show the image, title and excerpt of the first 6 posts. (It uses a function from Divi, here and there). function jm_blog_layout($atts) { ob_start();...

15 30 50 per page