Custom query for displaying WordPress custom post types that are more than 8 months old from current date

I'm using the following custom query in Wordpress within a for-loop that enables me to create a tabbed archive for the previous 8 months of the custom post type I've created for 'news'. This works...

How to set a default sort for WordPress post types

I have made a post type, "events", that use a custom field, "Datum" (Swedish for date). I want the default view for this post type to be sorted by this field. So far I got: register_post_type( ...

Custom post type + taxonomy term yearly/monthly archive

I have been researching on how to create a date archive for a custom post which has a taxonomy and various terms... I have had great success with this Stackoverflow answer from walltea however...

Date archives for custom post type

I have seen many questions/posts regarding this, but have yet to find a decent solution. Basically I am trying to do what wp_get_archives does, but for a custom post type (personally I am unsure...

Wordpress Order posts by custom field value

Hope someone can help. I have a custom post type called Collections that needs to be sorted by a custom field called Seasons. On the Collection archive template there is a custom query that sorts...

Error 404 after deploying a simple Spring MVC app (without web.xml)

I want to learn some basics of Spring MVC based fully on annotations. I started with this tutorial. After cloning the repository hg clone https://bitbucket.org/arnelism/snoutbook and building...

Date archives for custom post type not working after moving WordPress folder

I added date archives for custom post types as described in this Question (https://stackoverflow.com/questions/23386709/date-archives-for-custom-post-type/26783102#26783102), and they worked...

I want to add "Category" to my WP breadcrumbs

I have a premium WordPress theme which has breadcrumbs by default, but it does not show Category (and Sub-Category) item when on post page: Home > Category > Sub-Category > Post Title Instead it...

Hiding options in select box using Javascript

<html lang="en-US"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width"> <title>Home – dilo</title> <!--[if lt IE 9]> <script...

'orderby' multiple meta keys/values on pre_get_post

Scenario: i have an archive-job.php template and a pre_get_post function: function cbk_job_archive_override($query) { if ( is_post_type_archive( 'job' ) && $query->is_main_query() ) { ...

.addEventListener is not a function?

Someone has helped me with this script in Codepen where it worked fine, until i tried to implement it into my Wordpress website. The two sets of grey dots are buttons. Each button will open it's...

Display Excerpts of Posts in Wordpress Blog

I have been searching for the answer to my problem and I continually come up with replacing <?php the_content(); ?> with <?php the_excerpt(); ?> in the index.php file. However, the theme we...

Wordpress Order by date on custom post type archive page

I have a custom post type called city guide and i created a archive page with the following code in wordpress. The posts displays but not in the order.I need it with date and desc ordering. When i...

order custom posts by custom field [WCK]

I am using WCK to create the custom post type and fields. I have created a custom post type athlete and one of the custom fields for this post type is 'last-name'; I can display all the athlete on...

Pagination shows empty pages for date based archive.php loop

I'm using wordpress and have a custom archive page for a custom post type. The custom loop gets the logged in users registration date and only shows posts that were published on or after they...

Add different logo to wordpress pages

I have a theme i am customizing on wordpress(Increate themes), the thing is the owner wants a page that talks something different and it will also have a different logo, my question is how can i...

Custom post meta showing on localhost, but not live server?

I'm having an issue and, honestly, I have absolutely no idea what's going on... I have some custom meta fields for my custom post type (called review). On my local installation, they appear and...

How to generate custom post types year archive rewrite rules?

Ok, after trying to do it by myself as I usually do with rewrites (but this time for some reason, with no luck) I've found this...

Move MySQL PostMeta table rows out of wp_postmeta and into new table by Date

I am managing a woocommerce store where the wp_postmeta table is getting out of control with 800k rows and growing on a daily basis. I would like to build a query that would allow me to move...

2 pre_get_posts functions to filter by custom fields

EDIT: See the last (3rd) code snippet, it's the working one. I have an "Actions" page (an archive for a custom post type called Actions), which is an equivalent to "events". I used this tutorial...

Failed to access wordpress rest api from remote machine using postman to get response in JSON

I tried to setup wordpress on my mac. I installed successfully and tried to get response in json . It worked : like api : http://localhost:8888/<site>/wp-json/wp/v2/pages i.e. site is name of...

Sorting custom post type by Page Attributes in Archive file does not work

I created my Costom Post Type but I would like to order the posts by the number choosen in Page attributes. The Custom-post-type.php function register_post_team() { $labels = array( 'name' ...

Wordpress: List multiple post types on Index Page

I am working with a child theme of the twothousand-seventeen-theme because I would like to change a few things. But I've got a problem in realizing this one idea: I have created a custom post type...

WordPress: Query posts by date range

I'm working on pages in a WordPress site to show "Upcoming" and "Archived" events by date range using custom fields for event_start_date and event_end_date with the custom post type event. I'd...

My WordPress page is bugging after migration

I recently changed my site's host provider, and in the process I also changed my domain name. www.vægbyg.dk -> www.vaegbyg.dk I downloaded/uploaded my database through "phpMyAdmin", and used...

Use meta_query to display events by date in custom field

I'm working on a template for a specific category archive of the custom post type event. I need to make a query that shows future and ongoing events, ordering by a date in custom...

Custom post type archive with date condition

Am using The7 Theme. Since I wanted to create a NEWS section to post latest news (apart from the Blog, which is separate), I used the Custom Post Type UI plugin to create a custom post type named...

I want to display the category name and all the related posts in Wordpress

I'm using the plugin CPT UI. I want to display the category name and under that the post that belong with that category. I want it to look like this. enter image description here I would like to...

Hexo cannot display "next" theme

Noob here. I want to build a personal blog using Hexo with theme next, but I met some problems (no problems with other themes, e.g. landscape). I typed hexo s -g Cmd line returns INFO Validating...

Filter Custom Post Type Based on ACF date field value

I have a custom post type called "Events". All these events pages have a ACF Date Field to enter Event start Date. In the events archive page I want to divide these events between two...