This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Put this in a code block just BEFORE the repeater */ | |
/* WP_Query Reference: https://github.com/luetkemj/wp-query-ref */ | |
<?php | |
add_action( 'pre_get_posts', 'custom_query_name' ); | |
function custom_query_name( $query ) { | |
$cpt_id = get_queried_object_id(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Example of related posts repeater for any CPT with taxonomy: | |
* - Filter query to prevent altering queries inside the repeater items, | |
* - Retrieve post category slug : I have only one for each post, so I just take first element. | |
* (You might need to add error tests, of course, if you don't accept empty results, | |
* for instance if you forgot to set post category.) | |
* - Set tax_query arg with category slug | |
* - Set random order | |
* - Exclude current post | |
* - Deactivate pagination |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* I'll put here different examples of dynamic query for Oxygen repeater : | |
* - Use one of the following repeater_dynamic_query definitions | |
* in code block just BEFORE the repeater | |
* - Set the repeater custom query settings : post type, number of posts, order... | |
* - Add the remove_action in a code block AFTER the repeater | |
*/ | |
/**************************************************************************************************** | |
* Display related posts for any CPT with taxonomy: |
If you don't want to pay for the PRO version of this plugin, and you want to use the "Restore from Server" functionally that was present in the version 6.77, follow the instructions below:
- Open the js file: wp-content/plugins/all-in-one-wp-migration/lib/view/assets/javascript/backups.min.js
- On line 1208, replace the code below:
$('.ai1wm-backup-restore').click(function (e) {
NewerOlder