Plugin Directory

Changeset 2427460


Ignore:
Timestamp:
11/27/2020 07:12:33 PM (5 years ago)
Author:
brocardi
Message:

update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • brocardi/trunk/brocardi_plugin.php

    r2427418 r2427460  
    2727add_action('init', 'create_brocardi_news');
    2828
    29 
     29//rimuoviamo dati sull'autore del post nelle pagine archivi e post di brocardi
     30function my_functionbr( $query ){
     31    if( is_post_type_archive( 'brocardi_news' ) ) {
     32            echo '<style>
     33                .entry-meta{ display: none;}
     34            </style>';
     35    }
     36    if( is_singular( 'brocardi_news' ) ){
     37            echo '<style>
     38            .entry-meta{ display: none; visibility:hidden;}
     39        </style>';
     40    }
     41}
     42add_action( 'wp_head', 'my_functionbr' );
    3043
    3144add_action('init', 'azzera_cron');
    32 
    3345function azzera_cron(){
    3446    $date = date("Y-m-d", strtotime('-2 day'));
     
    4153    }
    4254}
    43 
    4455
    4556add_action('init', 'cancella_brocardi_news');
     
    95106function BP_myfunc( $canonical_url, $post ){
    96107    if( is_singular( 'brocardi_news' )  ) {
    97         echo '<style>
    98             .entry-meta{ display: none; visibility:hidden;}
    99         </style>';
    100108        $post_id = get_the_ID();
    101109        if($link = get_post_meta( $post_id, 'brocardi_link', true ) ){
Note: See TracChangeset for help on using the changeset viewer.