patpatpat
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [SmartAdapt] How to remove 'published by' from postsHi Katrine,
although I don’t know this theme in particular, I guess you have to findthe_author_posts_link()
in the phps or just find the words “published by” and comment out these code parts.Forum: Themes and Templates
In reply to: "Older Entries" & "Newer Entries" doesn't appear. Code ignored?Ok, I see that the code is just a basic structure.
So I found this https://codex.www.ads-software.com/the_loop and tried it out:<?php get_header(); ?> <div id="inhalt" class="text_single"> <?php query_posts($query_string . '&cat=-40'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="post"> <!-- Display the Title as a link to the Post's permalink. --> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. --> <small><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></small> <div class="entry"> <?php the_content(); ?> </div> <p class="postmetadata">Posted in <?php the_category(', '); ?></p> </div> <!-- closes the first div box --> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
But the only thing I get is one single post, but I already have 8. Why is the loop not working? Any suggestions? It looks so simple.
Is there no working simple loop with pagination out there for an archive of posts?
&cat=-40')
is just to make this to have no effect, as there is no cat with the id 40.Forum: Themes and Templates
In reply to: "Older Entries" & "Newer Entries" doesn't appear. Code ignored?Thank you. I tried it out. I use the code, I just found here https://codex.www.ads-software.com/Pagination
and changed it a bit, so it should appear in my area “inhalt”, which means “content”:<?php get_header(); ?> <div id="inhalt" class="text_single"> <?php if ( have_posts() ) : ?> <!-- Add the pagination functions here. --> <!-- Start of the main loop. --> <?php while ( have_posts() ) : the_post(); ?> <!-- the rest of your theme's main loop --> <?php endwhile; ?> <!-- End of the main loop --> <!-- Add the pagination functions here. --> <div class="nav-previous alignleft"><?php next_posts_link( 'Older posts' ); ?></div> <div class="nav-next alignright"><?php previous_posts_link( 'Newer posts' ); ?></div> <?php else : ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
Now nothing appears at all. What did I do wrong?
Forum: Themes and Templates
In reply to: "Older Entries" & "Newer Entries" doesn't appear. Code ignored?Yes it is a costum page template, but it was not my decision. Unfortunately, the former programmer can’t work on it anymore. If there’s a better solution than WP_Query() that makes it easier to get the navigation, I’m open to it.
Forum: Themes and Templates
In reply to: "Older Entries" & "Newer Entries" doesn't appear. Code ignored?Hi esmi, maybe I don’t understand your question. The outputsite is https://www.conceptualisms.org/main/
And the whole code of this page is<?php get_header(); ?> <div id="inhalt" class="text_single"> <?php $custom_query = new WP_Query('category_name=books,texts,news'); // exclude category 9 bzw. reblog while($custom_query->have_posts()) : $custom_query->the_post(); ?> <div <?php post_class(); ?> id="post-<?php the_ID(); ?>"> <h1 class="text_autor"><a href="<?php the_permalink(); ?>"><?php echo get_post_meta($post->ID, 'Autor', true); ?>, <?php the_title() ?></a></h1></p> <p class="text_datum"><?php the_date();?></p> <?the_excerpt(); ?> </div> <p>−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−</p> <?php endwhile; ?> <div class="text_datum"> <?php next_posts_link('« Older Entries') ?> <?php previous_posts_link('Newer Entries »') ?> </div> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
Is that what you asked for?
Forum: Themes and Templates
In reply to: center everything with wrapper in style.cssResolved. Thanks again.
Forum: Themes and Templates
In reply to: center everything with wrapper in style.cssOk, now it passed. Thanks. There was a wrapper in the single.php leftover from a previous attempt. Sorry.
I also deleted the closing body tag and one </div> in the header.php.So header.php ends with
</head> <body> <div id="wrapper"> <div id="header"> <?php if(function_exists('bcn_display')) { bcn_display(); }?> </div>
and this is the footer.php
</div> </body> </html>
Aaand: I changed the positions to relative. Works! Thank you WPyogi!
Forum: Themes and Templates
In reply to: center everything with wrapper in style.cssThank you!
Now I changed the body of the header.php to<body> <div id="wrapper"> <div id="header"> <?php if(function_exists('bcn_display')) { bcn_display(); }?> </div> </div> </body>
Still no effect at all. Shouldn’t the red test-frame appear at least?
The blog is an old “inherited” one. Sadly, the former programmer can’t be asked anymore. It might or might not be based on “elegantwhtite”. i’m not sure.Forum: Themes and Templates
In reply to: center everything with wrapper in style.cssOk, sorry. Here it is: https://www.conceptualisms.org/texts/alles-ist-wahr-oder-uber-konzeptuelle-texte-und-literatur/
And this is a part of the code i tried:
#wrapper { background-color: red; position: absolute; margin: 0 auto; center:0px; top:0px; width:1000px; }