• Lara

    (@mojamalarevolucja)


    Hey guys,

    since I′m working on a new project I built an interactive theme which causes quite a lot of traffic. I have some questions concerning the coding of the page (check it out at palimpsest.eu). Please be aware that only some elements are working until now ?? I hope it′s ok for you having several different questions in only one thread. Feel free to answer to only one of them. Thanks in advance!

    1. Ajaxifying of the page:

    As you probably see there is a huge amount of graphical material that is loaded into the frontend. However, only some elements need to be reloaded (basically only the book which forms one <div>). Is there any way to reload only that div while browsing the page e.g. using AJAX or is it generally not possible?

    2. Problem with the dragging script:

    For some reason it is possible to drag the elements on the table all around which is ok but causes a problem: Dragging elements downwards or to the right causes the layout to expand. What I want is making the elements draggable until the very edge but the layout to stay fixed.

    3. In the comment section I want the entries to appear in different fashions. I already tried to work with the odd/even function but for some reason it only applied to comments directly under the post (and the ones which i put into another div on the right). I looked for other codings which would let me apply at least 3 or 4 different comment-classes but it didn′t work out.

    4. Is there any way to make divs not only draggable but also rotatable at the SAME TIME? I found some tutorials but there were not really leading to what I wanted to do.

    5. I want the theme to play sounds on several onclick actions using Javascript. The effect works but it doesn′t apply to the “next_post_link/previous_post_link” PHP function (I used it to animate the turning pages). I would also use CSSs hover but playing sounds doesn′t seem to be supported. Do you see any other way?

    6. I need to change the layout of the book by the chosen category of the given article. I found a plugin that takes care of this but I wanted to ask if there is any other/easier (traffic saving) way to do it?

    Ok, that′s all for the moment. I hope you can help me in some way. As I am more or less totally new to CSS and PHP it took me one week to build the page and research all coding stuff and I hope not having overseen a thread that treats one of my issues.

    Best regards,
    Lara

Viewing 1 replies (of 1 total)
  • Thread Starter Lara

    (@mojamalarevolucja)

    @6

    I tried to include different layouts by using this code:

    <?php if (have_posts()) : ?><?php $first = 1; while (have_posts()) : the_post();
    
    		if (is_category('4')) {
    		get_template_part( 'index-4' );
    		} else if (is_category('5')) {
    		get_template_part( 'index-5' );
    		} else if (is_category('16')) {
    		get_template_part( 'index-16' );
    		} else if (is_category('17')) {
    		get_template_part( 'index-17' );
    		} else if (is_category('18')) {
    		get_template_part( 'index-18' );
    		}else if (is_category(18)) {
    		get_template_part( 'index-18' );
                    }else if (is_category('19')) {
    		get_template_part( 'index-19' );
    		}else {<p>This is some generic text to describe all other category pages,
    I could be left blank</p>; }
    ?>

    I already mentioned that I am new to PHP so maybe someone could correct me what I’m doing wrong.

Viewing 1 replies (of 1 total)
  • The topic ‘Need help with some template issues’ is closed to new replies.