Forum Replies Created

Viewing 8 replies - 121 through 128 (of 128 total)
  • Thread Starter dunkkan

    (@dunkkan)

    I know for exemple the plugin could start like this:

    <?php
    /*
    Plugin Name: Gallery Overwriter
    */
    
    remove_shortcode(gallery);
    add_shortcode('gallery');
    
    ?>

    Somebody can help me for writing the suite ?

    Thread Starter dunkkan

    (@dunkkan)

    Hello,

    I found a method fot that :

    In your CSS stylesheet, write the following:

    img {width: auto; height: auto;}

    Note that every image will be always resized to its natural size, so you could play with some classes and id’s here, to get only the gallery’s images be concerned by that statement, like:

    img.gallery {width: auto; height: auto;}

    I’m not sure if that second code would function, maybe there’s some grammar error there, I haven’t test it. But the first option is tested and works like a charm.

    Thread Starter dunkkan

    (@dunkkan)

    Ok, almost solved, ’cause I can edit it in the html editor 😛

    But, anyway, you should be able to make the task automatic …
    Have somebody tried to explore it ?

    Thread Starter dunkkan

    (@dunkkan)

    I forgot to mention in my case I delete the ‘title’ tag before ‘the content’ tag, because don’t need it 😛

    Thread Starter dunkkan

    (@dunkkan)

    Ok I get something.

    1- You create a php file. A page Template. What it means it starts like this:

    <?php
    /*
    Template Name: Chuck Norris
    */
    ?>

    You can change the template’s name, or let ‘Chuck Norris’, as you want.
    Then you write some code, for a post which will be displayed first:

    <?php rewind_posts(); ?>
    <?php
     $posts = get_posts('category=14');
     foreach($posts as $post) :
        setup_postdata($post);
     ?>
     <?php the_content(); ?>
     <?php endforeach; ?>

    As I want to display my category 14, where I just have 1 post, I write 14 in the adequated place below.

    Then, we go for the second post to display:

    <?php
     $posts = get_posts('category=15');
     foreach($posts as $post) :
        setup_postdata($post);
     ?>
     <?php the_content(); ?>
     <?php endforeach; ?>

    The same operation, with category 15.

    Like this you can get an initially EMPTY page, without its own, normal loop, but full of FOREIGN posts.
    Then, playing with html/css you can build a very cool home page (you can set it as a homepage in the Ad panel), with a main article, and some complementary articles, all of them build as posts in the Post Editor.

    Enough for what I wanted.

    I’m not able to understand properly the ‘rewind’ function which is in the first post, and which theoretically helps to regain the possibility to display a second loop. I was not able to set at the same time a normal loop in there, so the call for a rewind function is maybe not necessary here, because the only posts I’m building comes from ‘somewhere else’. More techie, depurated info at http://codex.wordpress.org/Template_Tags/get_posts#Parameters

    I hope this helps somebody. My code can be full of horrors even in the shortest line, so be carefull.

    Hi hitesh,

    You must go to the Theme Editor, go to index.php, and look what id (id=”blablabla”) or class (clas=”xxxx”) determinates each column look.

    You just check it, and then, still in the Theme Editor, go inside style.css. There you look for the id or class (id are applied to elements in the .html which only appears once, and classes to elements which repeats, so probably is an id, and in the .css files will start with this sign #).

    Imagine the id is called #firstcolumn. You can find something like:

    #firstcolumn {
    float: right
    }

    Or other ways of positioning. There you change to the right position. For some reason the page you linked is hyper-slow to download it. Then I could check the files. Sorry about my english.

    I hope this help, I’m not an expert 🙂

    Thread Starter dunkkan

    (@dunkkan)

    Thanks mercime for reply,

    I was thinking in several pages, two or three, with just a little of text written in it (two paragraphs), modified every week, which can join a page with the ‘main’ text, a long article for exemple.

    I hope I’m understanding your request.

    What I need is write them in the Editor, instead of in the html.

    Hi raine,

    What I’d do is to work directly in the html, like you said.

    First, go to the .php file where you want to place your images : the sidebar, or index.php.

    Then, try to write a simple html call :

    <div>
    <img src="http://www.yourdomain.com/directorywhereWPis/images/image1.jpg" width="200" height="150">
    </div>

    You can add some class or id here, reflected in your CSS file, for exemple:

    <div id="logos">
    <img src="http://www.yourdomain.com/directorywhereWPis/images/image1.jpg" width="200" height="150">
    </div>

    and then in style.css:

    #logos {margin-left: 15px;}

    Width and height will be relatives to the size of your .jpg, obviously. You can even set them in auto.

    Making the links:

    <div id="logos">
    <a href="SOMEURL" ><img src="http://www.yourdomain.com/directorywhereWPis/images/image1.jpg" width="200" height="150"></a>
    </div>

    You can place also the images between the images your theme provides, or in the folder where WordPress stock the files uploaded with the Media Manager in the Post’s Editor. Just try to get the correct path in src=””.

    If something goes wrong, try to place your folder with the images somewhere else, in the root directory is a good place.

Viewing 8 replies - 121 through 128 (of 128 total)