Giurex
Utente Attivo
- Messaggi
- 843
- Reazioni
- 160
- Punteggio
- 54
No intendevo
al posto di
Codice:echo $element;
Per vedere se veramente ti da l'url giusto
Se lo metto al posto di quello mi da sempre lo stesso errore, ma per verificare che desse in effetti il link che desidero ho scritto in un punto a caso echo the_permalink(); e viene scritto :D
- - - Updated - - -
Ho provato a scrivere quindi:
<?php
include("simple_html_dom.php");
$link= echo the_permalink();
$html = file_get_html("$link");
$element = $html->find('b[class=priceLarge]/text()',0);
echo $element;
?> </span>
ma quando visualizzo la pagina vedo
Parse error: syntax error, unexpected T_ECHO in /membri/keyebe/wp-content/themes/Ebuy/taxonomy-product.php on line 29
SPOILER DI TUTTO IL FILE.PHP CHE STO MODIFICANDO:
<?php get_header(); ?>
<ul class="breadcrumbs clearfix"><?php be_taxonomy_breadcrumb(); ?></ul>
<div id="content">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="box <?php if (++$count % 3 == 0) { echo "lastbox"; } ?>" id="post-<?php the_ID(); ?>">
<div class="btitle">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div>
<div class="boxim">
<?php
if ( has_post_thumbnail() ) { ?>
<a href="<?php the_permalink() ?>"><img class="boximg" src="<?php get_image_url(); ?>" height="150" width="150" zc="1" alt=""/></a>
<?php } else { ?>
<a href="<?php the_permalink() ?>"><img class="boximg" src="<?php bloginfo('template_directory'); ?>/images/dummy.png" alt="" /></a>
<?php } ?>
</div>
<div class="boxmeta clearfix">
<span class="p-cost"> <?php
include("simple_html_dom.php");
$link= echo the_permalink();
$html = file_get_html("$link");
$element = $html->find('b[class=priceLarge]/text()',0);
echo $element;
?> </span>
<span class="p-link"> <a href="<?php the_permalink() ?>"> Dettagli </a> </span>
</div>
</div>
<?php if(++$counter % 3 == 0) : ?>
<div class="clear"></div>
<?php endif; ?>
<?php endwhile; ?>
<?php getpagenavi(); ?>
<?php else : ?>
<h1 class="title">Not Found</h1>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<ul class="breadcrumbs clearfix"><?php be_taxonomy_breadcrumb(); ?></ul>
<div id="content">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="box <?php if (++$count % 3 == 0) { echo "lastbox"; } ?>" id="post-<?php the_ID(); ?>">
<div class="btitle">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div>
<div class="boxim">
<?php
if ( has_post_thumbnail() ) { ?>
<a href="<?php the_permalink() ?>"><img class="boximg" src="<?php get_image_url(); ?>" height="150" width="150" zc="1" alt=""/></a>
<?php } else { ?>
<a href="<?php the_permalink() ?>"><img class="boximg" src="<?php bloginfo('template_directory'); ?>/images/dummy.png" alt="" /></a>
<?php } ?>
</div>
<div class="boxmeta clearfix">
<span class="p-cost"> <?php
include("simple_html_dom.php");
$link= echo the_permalink();
$html = file_get_html("$link");
$element = $html->find('b[class=priceLarge]/text()',0);
echo $element;
?> </span>
<span class="p-link"> <a href="<?php the_permalink() ?>"> Dettagli </a> </span>
</div>
</div>
<?php if(++$counter % 3 == 0) : ?>
<div class="clear"></div>
<?php endif; ?>
<?php endwhile; ?>
<?php getpagenavi(); ?>
<?php else : ?>
<h1 class="title">Not Found</h1>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>