• Skip to primary navigation
  • Skip to main content

BookingWP™

WordPress Appointment Booking Plugins for WooCommerce

  • Get Appointments
  • Contact
  • My Account

Different post meta filter on different blog pages

Home › Forums › Deprecated › Bizznis

Log in
Bizznis
  • Jonathan Fokker
    Customer
    11 years, 5 months ago

    I have set up two seperate blog pages with different output.

    http://weydelandkaas.nl/categorie/recept-van-de-maand/ontbijt-recepten/

    And here: http://weydelandkaas.nl/nieuws/

    I have done this with this tutorial: http://demo.bizzthemes.com/bizznis/documentation/tutorials/modify-content-loop/

    But on one page I want to show the date and on the other I don’t. How do I control that?

    Greetings,

    Jonathan

     

    Zeljan Topic
    Support
    11 years, 5 months ago

    1. You could create a page and name it page-{slug}.php or page-{id}.php – replace {slug} or {id} with what your page you’re trying to edit has.
    2. After this, add the content as shown below to edit functions on this page:

      remove_filter( 'bizznis_post_info', 'do_shortcode', 20 );

      //* Run the Bizznis loop
      bizznis();

    Jonathan Fokker
    Customer
    11 years, 5 months ago

    Thanks.

    I did it a little bit different. I created a page-nieuws.php and added there the function that will output the meta of the post that I wanted

    <?php

    add_action( 'bizznis_entry_header', 'bizznis_post_info_new' );
    function bizznis_post_info_new() {
    global $post;
    # Doesn't do post info on pages.
    if ( 'page' == get_post_type( $post->ID ) ) {
    return;
    }
    $post_info = apply_filters( 'bizznis_post_info', '[post_date]' );
    printf( '

    %s
    ', $post_info );
    }

    //* Run the Bizznis loop
    bizznis();

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Follow @bookingwp 900+ followers

  • About
  • Blog
  • Support
  • Terms
  • Privacy

© BookingWP™