Wordpress PHP Snippets for templates

This item was filled under [ Wordpress ]

Here are some very usefull informations for those who use Wordpress as CMS
PHP Snippets for templates – usefull functions

<?php the_content(); ?>
Content of the posts

<?php if(have_posts()): ?>
Checks if there are posts

<?php while(have_posts()) : the_post(); ?>
Shows posts if posts are available

<?php endwhile; ?>
Closes the ‘while’ PHP function

<?php endif; ?>
Closes the ‘if’ PHP function

<?php get_header(); ?>
Loads the header.php [...]

Continue reading...

Tagged with: [ , , , ]

Wordpress PHP snippets for header

This item was filled under [ Wordpress ]

Here are some very usefull informations for those who use Wordpress as CMS
PHP Snippets for header – usefull functions

<?php bloginfo(‘name’)?>
Title of the site

<?php wp_title(); ?>
Title of the specific post or page

<?php bloginfo(’stylesheet_url’); ?>
The style.css file’s location into the current layout

<?php bloginfo(‘pingback_url’); ?>
Pingback URL for the site

<?php bloginfo(‘template_url’); ?>
Locate the site’s theme files

<?php bloginfo(‘version’); ?>
Installed WordPress [...]

Continue reading...

Tagged with: [ , , , , ]

Wordpress cheats

This item was filled under [ Wordpress ]

Here are some very usefull informations for those who use Wordpress as CMS
Basic Template Files

style.css
Style sheet file

index.php
Home page file from selected template

single.php
Single post page file

archive.php
Archive or category file

searchform.php
Search form file (here you can add extra stuff)

search.php
Search content file

404.php
Error page file from selected template (you can customize this page)

comments.php
Default comments template file (this will not be [...]

Continue reading...

Tagged with: [ , , , , ]

5 Useful MySQL Functions And Control Flows

This item was filled under [ MySQL ]

1: IF()
If statements have been a life saver on many occasions. They are invaluable for checking a value then returning another value different from the one stored in the table.
sql Code:

SELECT
IF(myColumn1 = 1, ‘Yes’, ‘No’) AS myIfColumn
FROM
myTable

Result: If myColumn1 equals 1 then Yes else No.
2: ELT()
Similar to an if else statement. The ELT takes the [...]

Continue reading...

Tagged with: [ , , , ]

UNIX Variables

This item was filled under [ Linux ]

Variables are a way of passing information from the shell to programs when you run them. Programs look “in the environment” for particular variables and if they are found will use the values stored. Some are set by the system, others by you, yet others by [...]

Continue reading...

Tagged with: [ , ]
Page 4 of 7« First...«23456»...Last »
Update me when site is updated