This file contains hidden or 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
// Relevanssi add content to custom excerpts. | |
add_filter('relevanssi_excerpt_content', 'custom_fields_to_excerpts', 10, 3); | |
function custom_fields_to_excerpts($content, $post, $query) { | |
$custom_fields = get_post_custom_keys($post->ID); | |
$remove_underscore_fields = true; | |
if (is_array($custom_fields)) { | |
$custom_fields = array_unique($custom_fields); // no reason to index duplicates | |
foreach ($custom_fields as $field) { |
This file contains hidden or 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
<?php | |
/** | |
* Exclude current post/page/cpt from relationship field results | |
*/ | |
add_filter('acf/fields/relationship/query/name=NAME-OF-THE-FIELD', 'bcpj_query_exclude_offre_id', 10, 3); | |
function bcpj_query_exclude_offre_id( $options, $field, $the_post ) | |
{ | |
if( is_admin() ) | |
{ | |
$options['post__not_in'] = array( $the_post->ID ); |
This file contains hidden or 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
# Don't show errors which contain full path diclosure (FPD) | |
# Use that line only if PHP is installed as a module and not per CGI | |
# try using a php.ini in that case. | |
# Change mod_php5.c to mod_php7.c if you are running PHP7 | |
<IfModule mod_php5.c> | |
php_flag display_errors Off | |
</IfModule> | |
# Don't list directories | |
<IfModule mod_autoindex.c> |