• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Wie gezielt platzieren?

sinankurt

Neues Mitglied
Hallo,
ich möchte einige "share-buttons" in meine Artikel in meinem Blog einfügen. Ich weiß zwar, dass dieser Code in die single.php kommt, leider weiß ich aber nicht genau, wo ich sie dort einfüge damit sie an der markierten Stelle auftauchen.



Uploaded with ImageShack.us


Das ist die "Single.php" von Wordpress:

HTML:
<?php

    // calling the header.php
    get_header();

    // action hook for placing content above #container
    thematic_abovecontainer();

?>

        <div id="container">
            
            <?php thematic_abovecontent(); ?>
            
            <div id="content">
        
                <?php 
                
                the_post();
                
                // create the navigation above the content
                thematic_navigation_above();
        
                // calling the widget area 'single-top'
                get_sidebar('single-top');
        
                // action hook creating the single post
                thematic_singlepost();
                
                // calling the widget area 'single-insert'
                get_sidebar('single-insert');
        
                // create the navigation below the content
                thematic_navigation_below();
        
                // calling the comments template
                thematic_comments_template();
        
                // calling the widget area 'single-bottom'
                get_sidebar('single-bottom');
                
                ?>
        
            </div><!-- #content -->
            
            <?php thematic_belowcontent(); ?> 
            
        </div><!-- #container -->
        


<?php 

    // action hook for placing content below #container
    thematic_belowcontainer();

    // calling the standard sidebar 
    thematic_sidebar();
    
    // calling footer.php
    get_footer();

?>
 
Da dein Codeausschnitt mehr PHP als HTML enhält ist das schwehr zu sagen.
Wenn ich einen Tipp abgeben sollte, würd ich mich für einen ersten Versuch aber auf die Zeile nach
HTML:
<div id="container">
festlegen.
Ein Link zur betreffenden Seite wäre Hilfreich.
Da kann man sich den vom PHP generierten HTML-Code mal genau ansehen
 
Ich zitiere mich nur äußerst ungern aber
...die Zeile nach...

Allerdings landet es dann über der Navigation.
Ich würde es also so versuchen:

PHP:
<?php

    // calling the header.php
    get_header();

    // action hook for placing content above #container
    thematic_abovecontainer();

?>

        <div id="container">
            
            <?php thematic_abovecontent(); ?>
            
            <div id="content">
        
                <?php 
                
                the_post();
                
                // create the navigation above the content
                thematic_navigation_above();
//An dieser Stelle Einfügen
?>
<p>Dein gewünschter HTML-Code hier</p>
<?php
//Einfügen Ende
        
                // calling the widget area 'single-top'
                get_sidebar('single-top');
        
                // action hook creating the single post
                thematic_singlepost();
                
                // calling the widget area 'single-insert'
                get_sidebar('single-insert');
        
                // create the navigation below the content
                thematic_navigation_below();
        
                // calling the comments template
                thematic_comments_template();
        
                // calling the widget area 'single-bottom'
                get_sidebar('single-bottom');
                
                ?>
        
            </div><!-- #content -->
            
            <?php thematic_belowcontent(); ?> 
            
        </div><!-- #container -->
        


<?php 

    // action hook for placing content below #container
    thematic_belowcontainer();

    // calling the standard sidebar 
    thematic_sidebar();
    
    // calling footer.php
    get_footer();

?>
 
Äh?
Wie belieben? :-?
Ich hab doch den von dir geposteten Code von der single.php editiert und dir eine Stelle markiert.
Von mir gibts keinen Code!
Nur eine markierte Stelle in DEINEM Code plus ein paar unverzichtbare Zeichen an dieser Stelle.

EDIT:
Aha doch gefunden.
Diese Stelle wolltest du doch. Nur rechtssseitig.
Also entweder per text-align:right oder float:right
 
Vielen dank für alles, jedoch wie bringe ich die Buttons nach rechts? Sorry, bin totaler "Kein-HTML-Könner" :-)
 
Mach folgendes um deinen neu eingefügten Code herum
HTML:
<div style="float:right;">
Hier der Rest von deinem Code
</div>
Sollte es dabei zu weit nach rechts rücken, musst duzusätzlich die rechte margin definieren oder einen weiteren Container mit der gewünschten fixen Breite darum legen.

Und wenn du dann alles hast, lege ich dir dringend nahe dir noch mal die Grundlagen für HTML und CSS reinzuziehen!
 
Zurück
Oben