Posts tagged as:

template

Create a php file with some unique name (like snarfer.php) and put it in your WordPress theme directory.

This is the way you create a WordPress Page templates:

<?php
/*
Template Name: Snarfer
*/

Read more…

{ 0 comments }

This is a handy little guide, if you want to change the way that your Tag Results page is displayed.
As default, when you click on a Tag Link in a K2 Item, it will produce a page showing all full items which have that particular tag.

Now, if you Items contain a lot of information or you have a lot of Items with the same Tag, you will end up with quite a long list.

This little guide will explain how to reduce the displayed data to show just a snippet of the Item information plus add a bit of extra information.

Firstly, we are going to have to modify the generic.php file, this is located on components/com_k2/templates/
Now, If you do not want to modify this core file, then you can create a new K2 template first.
Read more…

{ 6 comments }

Open index.php of you remplate:

1. Check the top of your index.php file, it should be changed like this one or just use this code:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”<?php echo $this->language; ?>” lang=”<?php echo $this->language; ?>” dir=”<?php echo $this->direction; ?>” >

<head>
<jdoc:include type=”head” />
<link rel=”stylesheet” href=”<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css” type=”text/css” />
</head>

2. Replace all php codes relating to modules.
This is an example of an old code <?php mosLoadModules ( ‘header’, -3 ); ?>
Replace with this <jdoc:include type=”modules” name=”header” style=”xhtml” />

3. Replace the mainbody code from <?php mosMainBody(); ?> to <jdoc:include type=”component” style=”xhtml” />

4. Rename the template_css.css file in your /css folder to template.css

5. If there is stuff like this one on yout code:

<?php if (mosCountModules(‘user1′)) : ?>

Chenge ot to look like this: <?php if($this->countModules(‘user1′)) : ?>

6. Check if there are anouther external files like footer.php for example. If there are just open and remove some source code starting with MOS

This should be it :)

{ 1 comment }

If you want to change the look of the Joomla search module and Joomla search component:

Copy the file:

/components/com_search/views/search/tmpl/default.php

to

/templates/my_template/html/com_search/search/default.php

Now make a few changes in that file and refresh your site.

In a similar fashion, you can also override the Search Module layout file. Copy the file:

/modules/mod_search/tmpl/default.php

to

/templates/my_template/html/mod_search/default.php

{ 0 comments }

To do this open the the your 1.5. Joomla template  index.php

find this line of code:

<jdoc:include type="component" />

and change it to this:

<?php if (JRequest::getVar('view') != 'frontpage'): ?>
<div>
<jdoc:include type="component" />
</div>
<?php endif ?>

Read more…

{ 0 comments }