Forum Replies Created

Viewing 15 replies - 1 through 15 (of 20 total)
  • there is actually a default css live inspector on firefox (and chrome i just checked, and possibly IE). Open your webpage with firefox, right-click, select “inspect element” or smth like that (im using french version), then a dedicated window opens with the possibility to identfy css of each element and also to modify it live.

    Once you’ve got the css style you were looking for and the changes you wish to make to it, upload changes to your style sheet.

    So to confirm on the previous answer, the way to go now is to use these css identifiers you find in your browser, either as a default option or as a web developer plugin so you may always be able to find all styles associated with any element on any page.

    Hi !

    Lets say your custom field you named is “system”, create a variable which retrieves the value of that field:
    <?php $systemvalue = get_post_meta($post->ID, 'system', true); ?>

    Now you want to display that variable you just created ($systemvalue) by writing: if variable $systemvalue exists, then echo (display) that value else echo (display) “value missing”:

    <?php  if ($systemvalue) {
    				echo "<p>".$systemvalue."</p>";
    
    				}
    				else  {
    				 echo "<p>value missing</p>";
    				 }
    		?>

    You can put these two bits of code in the template page’s loop you want (home, category, post etc) and you will hav the custom field display for each post.

    Hi Jejemo!

    – caching is one of many aspects to look at:
    there is a plugin used such as w3 total cache: http://www.w3-edge.com/wordpress-plugins/w3-total-cache/

    -if u hav many pictures or images on your page of relatively large sizes you may have to compress them and save up to 80% space on those images without perceived quality decrease. FileMinimizer: http://www.balesio.com/fileminimizerpictures/eng/index.php
    I use the free trial version.

    of course there are other aspects which I am sure others will point to (amount of external javascript, plugins used…)

    Thread Starter campbelson

    (@campbelson)

    Thanks there was indeed white space after my custom function script tags.

    Thread Starter campbelson

    (@campbelson)

    Or let’s start with this:
    How to write a loop calling all custom values from all custom fields bearing the key name video(n) (video1, video2, video3 etc..) and how to display them according to that order ?

    while ($video != NULL)
    {
    echo $video.$n;
    $n++
    }
    Thread Starter campbelson

    (@campbelson)

    removed first bit so that:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    and it worked, nice one Esmi, thanks!!!

    Thread Starter campbelson

    (@campbelson)

    vwww.rootdomain.com/docus/

    Thread Starter campbelson

    (@campbelson)

    I dont really get the part on htaccess.
    Permalinks are set on http://www.domain/post-example/, where domain is my new domain (same server).
    and this is the htaccess file

    SetEnv PHP_VER 5
    AddDefaultCharset UTF-8
    SetEnv REGISTER_GLOBALS 0
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /docus/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /docus/index.php [L]
    </IfModule>
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    where “/docus/index.php” is the address of the actual location of the files on host server.

    Anything wrong there?
    (only dynamic home page and admin panel work and display new domain url; all other post/pages show internal server error)

    Thread Starter campbelson

    (@campbelson)

    cheers Esmi,

    It did not make it work to add suggested code in wp-config.php or functions.php.

    Looking at htaccess section now…

    Thread Starter campbelson

    (@campbelson)

    Hi Drew Jaynes,

    Thanks for your answer!

    I could use HTML equivalents but that would mean changing all titles bearing special characters. And since the issue is only showing on the home page, where I have added code to display post titles, I should maybe get that added code revisited first. After, I should be considering your thread link which mentions theme-related issues.

    Would there be anything wrong with that code?

    <?php if (have_posts()) : ?>
    
            <?php $posts = get_posts('orderby=rand&numberposts=12&cat=4'); foreach($posts as $post) { ?>
    <?php } ?>
    
            <?php $options = get_option('responsive_theme_options'); ?>
    
    <?php while (have_posts()) : the_post(); ?>
    <h1 class="post-title">
     <a href="<?php the_permalink(); ?>"><?php if (strlen($post>post_title)> 24) {
    				echo substr(the_title($before = '', $after = '', FALSE), 0, 24) . '...';}
                                    else {
    				the_title();
    				} ?>
    </a>
     </h1>
    <?php endwhile; ?>
    <?php endif; ?>
    Thread Starter campbelson

    (@campbelson)

    It does have a sidebar-left.php if you use the three colums layout…
    And indeed, using the web developer addon for firefox enables one to see which class or id name is associated with the menu….
    cheers, seems to be sorted now.

    Thread Starter campbelson

    (@campbelson)

    So far I found this line of code to have the parent page display as a link within the page path:

    <?php $permalink = get_permalink($post->post_parent); ?>
    <a href="<?php echo $permalink; ?>">Parent</a>

    this is what I’m looking for but instead of having the word “parent” I would need the parent page’s NAME.

    Thread Starter campbelson

    (@campbelson)

    My mistake, I ommited “rc_” before comment. So this is the line of code, IF USING CHOCOLATE-LITE THEME for displaying the avatar or gravatar related to a comment:

    <?php echo get_avatar( $rc_comment->comment_author_email, $img_w); ?>

    If using another theme, just change the variable comment (here $rc_comment) to the one you have working on your script.

    Thread Starter campbelson

    (@campbelson)

    ok I used another code instead:

    <h2><a name="r">R</a></h2>
    <?php
               $args=array(
               'post_type' => 'page',
    		   'meta_key' => 'alphabet',
               'caller_get_posts'=>1,
    		   'meta_value' => 'r'
               );
            $my_query = new WP_Query($args);
            if( $my_query->have_posts() ) {
              while ($my_query->have_posts()) : $my_query->the_post(); ?>
                <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
                <?php
              endwhile;
            }
    ?>
    </div>
    
    <h2><a name="s">S</a></h2>
    <?php
               $args=array(
               'post_type' => 'page',
    		   'meta_key' => 'alphabet',
               'caller_get_posts'=>1,
    		   'meta_value' => 's'
               );
            $my_query = new WP_Query($args);
            if( $my_query->have_posts() ) {
              while ($my_query->have_posts()) : $my_query->the_post(); ?>
                <p><a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
                <?php
              endwhile;
            }
    ?>
    </div>

    In this instance however I have to re-include the code for each alphabetic letter <h2>R</h2>, <h2>S</h2>, <h2>T</h2> etc. Bearing in mind I want to list all posts according to an alphabetic letter (26 letters) and sort them acordingly under their respective h2, I will have to copy paste + modify key-value 26 times.

    Does anyone know of a more dynamic way to compile this? 🙂

    Thread Starter campbelson

    (@campbelson)

    well if you can help me to call all pages with the custom field “alphabet=A” I could maybe continue on my own? 🙂

    Using your code:
    $query = new WP_Query( array ( 'orderby' => 'title' ) );
    Where do you put the custom field name and value?
    as such:
    $query = new WP_Query( array ( 'orderby' => 'title' 'alphabet' 'a' ) );?

Viewing 15 replies - 1 through 15 (of 20 total)