europasobreruedas
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: several “recent entries”, is it possible?ok, that’s right. Thank you very much.
Forum: Fixing WordPress
In reply to: several “recent entries”, is it possible?Sorry, I published twice the same post
Forum: Fixing WordPress
In reply to: several “recent entries”, is it possible?Eureka,
I already know where the code is added, at the end of the page. Look this páge: https://www.europasobreruedas.com/cronicas/importacion-porsche-911-carrera-russelsheim-alemania/I’ll leave it until you see, I don’t know why he added there and not in the sidebar. By the way, instead of 1 post I white 4 in line:
<?php query_posts('category_name=Audi&showposts=4');
Are you the true reason why the added post at the end rather than sidebar?
Thanks
Forum: Fixing WordPress
In reply to: several “recent entries”, is it possible?Ok tsguitar,
I pasted your code in sidebar.php, in fact I left it pasted because I think it does nothing. You can see sidebar.php with new code:<?php query_posts('category_name=Audi&showposts=1'); while (have_posts()) : the_post(); // do whatever you want ?> <a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a> <?php endwhile; ?> <div id="back"> <?php if (isset($_SERVER["HTTP_REFERER"])) { ?> <span>« <a href="<?php echo $_SERVER['HTTP_REFERER'];?>" title="Volver en Crónicas">Volver</a></span> <?php } ?> <a href="#documentContent" title="Subir en Crónicas">Subir</a> » </div> </div> </div>
I don’t understand anything, maybe need to paste the code in another file, what do you think?. I’ll follow with tests. Thanks.
Forum: Fixing WordPress
In reply to: several “recent entries”, is it possible?Thanks tsguitar for information about error, that’s working now.
I pasted your code in sidebar.php and don’t working, looks sidebar.php code
<div id="back"> <?php if (isset($_SERVER["HTTP_REFERER"])) { ?> <span>« <a href="<?php echo $_SERVER['HTTP_REFERER'];?>" title="Volver en Crónicas">Volver</a></span> <?php } ?> <a href="#documentContent" title="Subir en Crónicas">Subir</a> » </div> </div> </div> <div id="column2"> <div class="container-left"> <div class="rss"><a href="<?php bloginfo('rss2_url'); ?>" title="Subscribirse a <?php bloginfo('name'); ?>" class="iconrss">Suscripción a RSS de CRÓNICAS</a></div> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Left Sidebar') ) : else : ?> <ul><li class="listHeader"><h2><?php _e('Calendar'); ?></h2></li> <li class="calendar"><?php get_newcalendar() ?></li> </ul> <ul><li class="listHeader"><h2><?php _e('Archives'); ?></h2></li> <?php wp_get_archives('type=monthly'); ?> </ul> <ul><li class="listHeader"><h2><?php _e('Categories'); ?></h2></li> <?php wp_list_cats('sort_column=name&optioncount=0&hierarchical=0'); ?> </ul> <?php endif; ?> </div> </div> </div>
I’m going to experiment with pasting the code in different spots. For example, I pasted your code in single.php
<?php get_header(); ?> <?php query_posts('category_name=Audi&showposts=1'); ?> <?php query_posts('name=Audi&showposts=1'); ?> <? if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>">
and don’t working, maybe because isn’t “category_name” else “name”, but I have the error: “Sorry, no posts matched your criteria.”.
Thanks and I’ll continue check.
That’s right, address is https://www.europasobreruedas.com/cronicas, excuse me.
Forum: Fixing WordPress
In reply to: several “recent entries”, is it possible?Excuse me Tsguitar by confusion.
My blog is: https://www.eruopasobreruedas.com/cronicasYou can see “úLTIMAS IMPORTACIONES” and there are Mercedes cars mixed with Audi cars, Porsche cars, etc.
Where do you want all these entries to appear? In your sidebar? Edit sidebar.php. In the main blog area? Edit index.php.
I want it to appear in the sidebar on every page. Do you want send you the contents of sidebar.php, index.php, to tell me where do I have to integrate.
Do you have categories and entries in your blog yet? Do you have an entry in the Audi category?
Yes I have, in fact, if you go at the end the sidebar you can select “Audi” for example and you’ll see three “Crónicas” then, if you look to the top de page you can see an error:
WordPress database error: [Table 'europaso_cronicas.wp_categories' doesn't exist] SELECT cat_ID FROM wp_categories WHERE category_nicename = 'audi'
Do you know solve it?
Thank you for your patience
Forum: Fixing WordPress
In reply to: several “recent entries”, is it possible?Thanks tsguitar,
So the different car manufacturers will be categories and you want to have the latest post from each category?
Yes it is.
What is the file that I modify, single.php?
I did:<?php get_header(); query_posts('category_name=Audi&showposts=1'); if (have_posts()) : while (have_posts()) : the_post(); ?> ......
Only I added the line
<? php query_posts ( 'category_name = Audi & showposts = 1');
but it doesn’t work.
ThanksForum: Fixing WordPress
In reply to: Only one result to make searches on my blog, why?Thanks rudolf45. Can I change it. I want show 1 post for readind. but show all post wen I search. Tank you