Soapmarine
Members
-
Joined
-
Last visited
Reputation Activity
-
Soapmarine got a reaction from Kaskhautual in Language selector doesnt workhello everyone,
I added simple PHP code in the homepage template. To have one block of news headlines (from Blog section). It should be automatic: everytime I create a new post, it should appear on the homepage. Unfortunately, it doesnt pick up at all in second language the blog news first lines. But it does in default language. The code looks correct. I have played around, created, deleted a new post - no effect! It worked when I checked "sticky" post. But this is not what I want.
Here is the site: www.olivia.be It runs on Wordpress, languages are supported by WPML plugin.
Please, any help?
get_header(); ?> <div class="container clearfix"> <div class="homepage-content"> <?php // start content output // if ( have_posts()) : while ( have_posts()) : the_post(); // the_content(); // endwhile; endif; // end content output // JHL TODO:edit ?> <div class="ten columns"> <?php // fr_FR nl_NL ?> <?php if (get_locale() == 'fr_FR'){ $page = get_page_by_title( "Top Nouvelles" ); echo apply_filters( 'the_content', $page->post_content ); }else if (get_locale()){ $page = get_page_by_title( "Top News" ); echo apply_filters( 'the_content', $page->post_content ); } ?> </div> <div class="five columns"> <?php // get latest post $args = array( 'post_type' => 'post', 'category__not_in' => '16', 'posts_per_page' => 5, 'post_status' => array('future', 'publish'), 'orderby' => 'post_date', 'order' => 'DESC', ); $dd_query = new WP_Query( $args ); if ( $dd_query->have_posts() ) : while ( $dd_query->have_posts() ) : $dd_query->the_post();?> <div class="post-list-element"> <a href="<?php echo the_permalink();?>"> <div class="left"><?php echo the_title();?></div> <!-- <div class="right"><span class="icon-calendar"></span><?php //echo the_date();?></div> --> </a> <!-- <div class="info"><?php echo the_excerpt();?></div> --> </div> <?php endwhile; endif; // get latest donateurs post /*$args = array( 'post_type' => 'post', 'category__in' => '16', 'posts_per_page' => 1, 'post_status' => array('future', 'publish'), 'orderby' => 'post_date', 'order' => 'DESC', ); $dd_query = new WP_Query( $args ); if ( $dd_query->have_posts() ) : while ( $dd_query->have_posts() ) : $dd_query->the_post();?>*/ /*<div class="post-list-element"> <a href="<?php echo the_permalink();?>"> <div class="left"><?php echo the_title();?></div> <div class="right"><span class="icon-calendar"></span><?php echo the_date();?></div> </a> <div class="info"><?php echo the_excerpt();?></div> </div> <?php*/ /*endwhile; endif;*/ ?> </div> </div> </div> <?php global $dd_sn; $home_sections = ot_get_option( $dd_sn . 'home_sections', false ); if ( $home_sections ) { $parity = 'even'; foreach ( $home_sections as $home_section ) { if ( $parity == 'odd' ) { $parity = 'even'; } else { $parity = 'odd'; } if ( ! isset( $home_section[ $dd_sn . 'module_blog_cat' ] ) ) { $home_section[ $dd_sn . 'module_blog_cat' ] = 'all'; } if ( ! isset( $home_section[ $dd_sn . 'module_causes_cat' ] ) ) { $home_section[ $dd_sn . 'module_causes_cat' ] = 'all'; } if ( ! isset( $home_section[ $dd_sn . 'module_post_width' ] ) ) { $home_section[ $dd_sn . 'module_post_width' ] = 'one_fourth'; } if ( 'tabs' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_tabs( array( 'parity' => $parity, 'title' => $home_section['title'] ) ); } elseif ( 'causes' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_causes( array( 'parity' => $parity, 'title' => $home_section['title'], 'amount' => $home_section[ $dd_sn . 'module_amount_posts'], 'category' => $home_section[ $dd_sn . 'module_causes_cat' ], 'post_width' => $home_section[ $dd_sn . 'module_post_width' ] ) ); } elseif ( 'news' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_blog( array( 'parity' => $parity, 'title' => $home_section['title'], 'amount' => $home_section[ $dd_sn . 'module_amount_posts'], 'category' => $home_section[ $dd_sn . 'module_blog_cat' ], 'post_width' => $home_section[ $dd_sn . 'module_post_width' ] ) ); } elseif ( 'events' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_events( array( 'parity' => $parity, 'title' => $home_section['title'], 'amount' => $home_section[ $dd_sn . 'module_amount_posts'] ) ); } elseif ( 'products' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_products( array( 'parity' => $parity, 'title' => $home_section['title'], 'amount' => $home_section[ $dd_sn . 'module_amount_posts'] ) ); } elseif ( 'staff' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_staff( array( 'parity' => $parity, 'title' => $home_section['title'], 'amount' => $home_section[ $dd_sn . 'module_amount_posts'] ) ); } elseif ( 'text' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_text( array( 'parity' => $parity, 'title' => $home_section['title'], 'content' => $home_section[ $dd_sn . 'module_text_content'] ) ); } elseif ( 'sponsors' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_sponsors( array( 'parity' => $parity, 'title' => $home_section['title'], 'amount' => $home_section[ $dd_sn . 'module_amount_posts'], 'post_width' => $home_section[ $dd_sn . 'module_post_width' ] ) ); } elseif ( 'events_no_cal' == $home_section[ $dd_sn . 'module' ] ) { dd_home_section_events_no_cal( array( 'parity' => $parity, 'title' => $home_section['title'], 'amount' => $home_section[ $dd_sn . 'module_amount_posts'], 'category' => $home_section[ $dd_sn . 'module_causes_cat' ], 'post_width' => $home_section[ $dd_sn . 'module_post_width' ] ) ); } } } else { /* Default */ // Disable footer slider // dd_home_section_tabs( array( 'parity' => 'odd', 'title' => '' ) ); // dd_home_section_causes( array( 'parity' => 'even', 'title' => 'OUR CAUSES' ) ); // dd_home_section_blog( array( 'parity' => 'odd', 'title' => 'BLOG' ) ); // dd_home_section_events( array( 'parity' => 'even', 'title' => 'EVENTS' ) ); // dd_home_section_products( array( 'parity' => 'odd', 'title' => 'PRODUCTS' ) ); } get_footer(); ?>
-
Soapmarine got a reaction from fallenzen in Hi there! I'm a girl webdesignerHello everyone,
I'm rather newbie in webdesign but I do my best, I learn, create, test, crush and continue to create! Together with a partner in crime (girl too!) who is graphic designer we founded our little tiny agency: www.madebymaud.com - I'm polishing and finishing the layout of the website now.
We are only too, she is visual, I'm techy, sometimes we laugh that we definately need 3d person to help us with webby stuff - a smarty guy!
I came from financial school, than did marketing stuff, now reconverted into webdesign. I love this challenge. I love to learn. I know that I know only a drop of the ocean in this area but I'm brave
I welcome any friendly and open-minded connection here!
Soapmarine
-
Soapmarine got a reaction from Marlenmorlock in Hi there! I'm a girl webdesignerHello everyone,
I'm rather newbie in webdesign but I do my best, I learn, create, test, crush and continue to create! Together with a partner in crime (girl too!) who is graphic designer we founded our little tiny agency: www.madebymaud.com - I'm polishing and finishing the layout of the website now.
We are only too, she is visual, I'm techy, sometimes we laugh that we definately need 3d person to help us with webby stuff - a smarty guy!
I came from financial school, than did marketing stuff, now reconverted into webdesign. I love this challenge. I love to learn. I know that I know only a drop of the ocean in this area but I'm brave
I welcome any friendly and open-minded connection here!
Soapmarine
-
Soapmarine got a reaction from MMMedia in Hi there! I'm a girl webdesignerLove your natural look. My husband wears the same wig to do his grocery.
-
Soapmarine got a reaction from Sysode in Hi there! I'm a girl webdesignerHello everyone,
I'm rather newbie in webdesign but I do my best, I learn, create, test, crush and continue to create! Together with a partner in crime (girl too!) who is graphic designer we founded our little tiny agency: www.madebymaud.com - I'm polishing and finishing the layout of the website now.
We are only too, she is visual, I'm techy, sometimes we laugh that we definately need 3d person to help us with webby stuff - a smarty guy!
I came from financial school, than did marketing stuff, now reconverted into webdesign. I love this challenge. I love to learn. I know that I know only a drop of the ocean in this area but I'm brave
I welcome any friendly and open-minded connection here!
Soapmarine