Etarget hirdetések a kezdőoldalon

Üdv











Egy kis segítségre lenne szükségem. Már kipróbáltam vagy 10 wp plugint, de egyik sem érte el a kívánt eredményt. Amire szükségem lenne:




  • etarget hirdetéseket szeretnék megjeleníteni az oldalam főoldalán a közzétett hírek alatt közvetlenül. Ez nagyjából félig sikerült, ha megnyitok egy bejegyzést akkor a hirdetés tökéletesen megjelenik ott ahol kellene, de sajnos a főoldalon ahol több bejegyzés található, ott nem jelenik meg. Van erre valamilyen plugin?

Igazából nem tudom ezt melyik oldal alatt szeretnéd megvalósítani, de ha a főlapon blog szerűen vannak felsorolva a bejegyzések és az összes alá szeretnéd, akkor az index.php fájlba kell midnen bizonnyal beillesztened az etarget kódot a loop után. Ha a loopba teszed, akkor minden bejegyzés alatt ott lesz egy hirdetés.

Ha esetleg beirnad a domain nevet ahol ezt probalgatod, sokkal egyszerubb lenne tanacsot adni…


'Nero' wrote:




Ha esetleg beirnad a domain nevet ahol ezt probalgatod, sokkal egyszerubb lenne tanacsot adni...


Nyilván, de még nincs megosztva a látogatók számára, és nem is szeretném publikussá tenni a startig.


Az oldalhoz ezt a témát használom: http://wordpress.org/extend/themes/graphene

'Efrud' wrote:




Igazából nem tudom ezt melyik oldal alatt szeretnéd megvalósítani, de ha a főlapon blog szerűen vannak felsorolva a bejegyzések és az összes alá szeretnéd, akkor az index.php fájlba kell midnen bizonnyal beillesztened az etarget kódot a loop után. Ha a loopba teszed, akkor minden bejegyzés alatt ott lesz egy hirdetés.











Így néz ki az index:









<?php

/**

* The main template file.

*

* This is the most generic template file in a WordPress theme

* and one of the two required files for a theme (the other being style.css).

* It is used to display a page when nothing more specific matches a query.

* E.g., it puts together the home page when no home.php file exists.

* Learn more: http://codex.wordpre...plate_Hierarchy

*

* @package WordPress

* @subpackage Graphene

* @since Graphene 1.0

*/

global $graphene_settings;

get_header(); ?>



<?php



/* Check if the user selects specific category for the front page */

if ( is_home() && $graphene_settings['frontpage_posts_cats'] && ! in_array( 'disabled', $graphene_settings['frontpage_posts_cats'] ) ) {

global $wp_query;

$cats = $graphene_settings['frontpage_posts_cats'];



// Display the sticky posts first

$stickies = get_option('sticky_posts');

if ( get_query_var( 'paged' ) < 2 && ( $stickies ) ) {

$args = array( 'category__in' => $cats, 'post__in' => $stickies );

query_posts( apply_filters( 'graphene_frontpage_posts_cats_sticky_args', $args ) );

$wp_query->is_home = true;

$wp_query->is_category = false;

$wp_query->is_archive = false;



if ( have_posts() ){

get_template_part( 'loop', 'index' );

}



wp_reset_query();

}



// Display the rest of the posts from the category

$args = array( 'category__in' => $cats, 'paged' => get_query_var( 'paged' ), 'post__not_in' => $stickies );

query_posts( apply_filters( 'graphene_frontpage_posts_cats_args', $args ) );

$wp_query->is_home = true;

$wp_query->is_category = false;

$wp_query->is_archive = false;

}











do_action('graphene_index_pre_loop');



/* Run the loop to output the posts.

* If you want to overload this in a child theme then include a file

* called loop-index.php and that will be used instead.

*/

if ( ! ( is_home() && $graphene_settings['frontpage_posts_cats'] && ! have_posts() ) )

get_template_part('loop', 'index');

?>










És http://wordpress.org...themes/graphene ezt a témát használom.





<?php


/**


* The main template file.


*


* This is the most generic template file in a WordPress theme


* and one of the two required files for a theme (the other being style.css).


* It is used to display a page when nothing more specific matches a query.


* E.g., it puts together the home page when no home.php file exists.


* Learn more: http://codex.wordpre...plate_Hierarchy


*


* @package WordPress


* @subpackage Graphene


* @since Graphene 1.0


*/


global $graphene_settings;


get_header(); ?>





<?php





/* Check if the user selects specific category for the front page */


if ( is_home() && $graphene_settings['frontpage_posts_cats'] && ! in_array( 'disabled', $graphene_settings['frontpage_posts_cats'] ) ) {


global $wp_query;


$cats = $graphene_settings['frontpage_posts_cats'];





// Display the sticky posts first


$stickies = get_option('sticky_posts');


if ( get_query_var( 'paged' ) < 2 && ( $stickies ) ) {


$args = array( 'category__in' => $cats, 'post__in' => $stickies );


query_posts( apply_filters( 'graphene_frontpage_posts_cats_sticky_args', $args ) );


$wp_query->is_home = true;


$wp_query->is_category = false;


$wp_query->is_archive = false;





if ( have_posts() ){


get_template_part( 'loop', 'index' );


}





wp_reset_query();


}





// Display the rest of the posts from the category


$args = array( 'category__in' => $cats, 'paged' => get_query_var( 'paged' ), 'post__not_in' => $stickies );


query_posts( apply_filters( 'graphene_frontpage_posts_cats_args', $args ) );


$wp_query->is_home = true;


$wp_query->is_category = false;


$wp_query->is_archive = false;


}

















do_action('graphene_index_pre_loop');





/* Run the loop to output the posts.


* If you want to overload this in a child theme then include a file


* called loop-index.php and that will be used instead.


*/


if ( ! ( is_home() && $graphene_settings['frontpage_posts_cats'] && ! have_posts() ) )


get_template_part('loop', 'index');


?>


















És http://wordpress.org...themes/graphene ezt a témát használom.