Results 1 to 4 of 4

Thread: Child theme override function problem

  1. #1
    Thread Starter
    ncirotto's Avatar
    Join Date
    Apr 2014
    Location
    Italy
    Posts
    26
    Thanks
    4
    Thanked 1 Time in 1 Post

    Child theme override function problem

    Hi,
    I'm trying to change the list of meta under title of ads listing.

    img01.jpg


    I want to show custom field and I tried to put this code in my child theme functions.php:
    Code:
    function my_cp_ad_loop_meta() {
    	global $post, $cp_options;
    	if ( is_singular( APP_POST_TYPE ) )
    		return;
    ?>	
    	<p class="post-meta">
    		<span class="folder"><?php if ( $post->post_type == 'post' ) the_category(', '); else echo get_the_term_list( $post->ID, APP_TAX_CAT, '', ', ', '' ); ?></span> | 
    		<span class="owner"><?php if ( $cp_options->ad_gravatar_thumb ) appthemes_get_profile_pic( get_the_author_meta('ID'), get_the_author_meta('user_email'), 16 ) ?><?php the_author_posts_link(); ?></span> | 
    		<span class="from"><?php _e("Dal: "); echo get_post_meta( $post->ID, 'cp_datefrom', true); ?></span> | 
    		<span class="to"><?php _e("Al: "); echo get_post_meta( $post->ID, 'cp_dateto', true); ?></span> | 
    		<span class="clock"><span><?php echo appthemes_date_posted($post->post_date); ?></span></span>
    	</p>
    <?php	
    }
    add_action( 'appthemes_after_post_title', 'my_cp_ad_loop_meta');
    It work but I have 2 results:
    img02.jpg

    I want to show only my code but nothing.
    I tried to put on the top of functions.php: remove_action( 'appthemes_after_post_title', 'cp_ad_loop_meta');

    And I tried also:
    Code:
    function my_remove_action() {    
    	remove_action( 'appthemes_after_post_title', 'cp_ad_loop_meta');
    }
    add_action( 'after_setup_theme', 'my_remove_action' );

    But nothing... Always 2 results.

    Thanks

  2. #2
    Thread Starter
    ncirotto's Avatar
    Join Date
    Apr 2014
    Location
    Italy
    Posts
    26
    Thanks
    4
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    Thread Starter
    ncirotto's Avatar
    Join Date
    Apr 2014
    Location
    Italy
    Posts
    26
    Thanks
    4
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    Thread Starter
    ncirotto's Avatar
    Join Date
    Apr 2014
    Location
    Italy
    Posts
    26
    Thanks
    4
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Override cp_header from Child Theme
    By cheltenhammedia in forum ClassiPress General Discussion
    Replies: 2
    Last Post: October 25th, 2013, 10:45 AM
  2. [SOLVED] CSS child theme override problem
    By cheltenhammedia in forum ClassiPress General Discussion
    Replies: 5
    Last Post: October 24th, 2013, 11:15 AM
  3. Override child theme-sidebars.php
    By tinnojr in forum ClassiPress General Discussion
    Replies: 1
    Last Post: August 21st, 2013, 03:54 AM
  4. [SOLVED] Child Theme: override the variables
    By einstein in forum ClassiPress General Discussion
    Replies: 3
    Last Post: March 25th, 2012, 05:04 PM
  5. Override Function in Core Theme
    By Leongelis in forum ClassiPress General Discussion
    Replies: 3
    Last Post: March 22nd, 2012, 12:14 AM