Hallo Comunity,
mein Problem ist folgendes: Sobald einem Beitrag eine bestimmte ID zugewiesen wird möchte ich folgende Ausgabe der Theme-Index Datei verändern:
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h1><?php the_title(); ?></h1>
<div class="entry" id="entry-<?php the_ID(); ?>">
<?php the_content('Read the rest of this entry »'); ?>
</div>
</div>
Alles anzeigen
Dann soll der Titel auch noch in den Entry-Kontainer fallen, also:
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="entry" id="entry-<?php the_ID(); ?>">
<h1><?php the_title(); ?></h1>
<?php the_content('Read the rest of this entry »'); ?>
</div>
</div>
Alles anzeigen
Prinzipiell würde ich eine If-Abfrage der Form "if (the_ID() == "36")" einbauen, aber ich weiß nicht wie ich mit dem Ausgabewert der Funktion the_ID arbeite.
Meine PHP-Kentnisse, jedenfalls das aktive Programmieren, sind nicht gerade groß. :-(
Ich hoffe Ihr könnt mir helfen.
Vielen Dank im Voraus!
Liebe Grüße,
Safran