Joomla slider and contact us page - php

i have made joomla template 2.5 but not finished so far.
1) I have a home page with slider i have made extra file for slider slider.php and include it in template.
now slider should be in only home page how it will be possible?
2) I have some other pages like about us, contact, product and categories.
how it will be possible with template to make a contact form and send it to client email id?
I have some more problems will describe but first want to sort out them and then proceed please help .

I think you are a little confused as to what Joomla is. It's a content management system, thus runs on extensions. It's not like creating your own basic PHP based site and hard coding everything.
Don't hard code the slider into the template. Instead, create a module position where the slide is at the moment, then turn the slider into a module. Converting you widgets and so on when you already have the code is fairly simple.
As for the contact form, this is also an extension which is already built into Joomla. So, in the Joomla backend, on the top menu, go to:
Components/Contacts/Contacts
Create a new one and enter the necessary details.
Then, create a new menu item and set the "type" to "Single Contact". Or you could download a contact extensions from JED. If you want to e-mail the members of the site, go to the Joomla backend, on the top menu go to:
Users/Mass Mail Users
Then simply go on from there.

for your slider problem, if you want to display your slider only in landing page or front page then you have to check the front page in your index.php file and then start your slider so that your slider only work for front page like this:
$app = JFactory::getApplication();
$menu = $app->getMenu();
if ($menu->getActive() == $menu->getDefault()) {
// Start display your slider
}
The about example will work in joomla2.5x version..
To know more check the joomla DOC
And for your second question you have two options, one is create a component for contact and then apply on your template or try to find some already made contact components from joomla extensions. OR modify the current com_contect component.

Related

Create page templates using plugins in a php files, With out opening php file, template handle from wp-admin side

I want to create page templates in (php) file using wp-dashboard. If I map the template to a parent. Parent should list in the template left side and if i click on the parent from the landing page left side its should display all the templates which i mapped to the parent page.
Anybody could you please help me to do the above scenario using wp-plugin?
Anyone can you please suggest the easiest way to create page template for the above scenario. Its possible please give me some ideas about process of creation of page templates.
Note: The admin user should able to handle the templates and its should not display any code.Once we created a template its should be reusable for template replication. For example if i create 100 landing page in all created landing page left side should display all landing page names , when i click any of the left side page name its should redirect to the corresponding page.
For this Any one can you please suggest plugin or idea to create the process.
Thank you.
Try to use the Elementor Page Builder Plugin, As you want to create the Page Template using with a plugin.
Create a Custom Page Template Plugin URL: Add Custom Page Template
Hope!! It will work!

How To make Google Form plugin appear on Homepage?

I'm using Chameleon Theme from eleganttheme.com for my site project. See at onthegoventuresng.com and I want to display a form below the 3 blurbs content areas on the homepage.
I spoke with the customer support, they said that's beyond the support they can provide for the theme. I was advised to seek a 3rd party help for the theme customization.
Meanwhile, I know it's the theme's homepage file home.php
I installed Google Form plugin with the intent that the form should display below the content areas on the homepage.
Pls how do I go about this any code to insert will be appreciated.
If you know where to add the code in home.php, you can try adding this:
<?php do_shortcode('[wpgform id="xx"]'); ?>
Replace xx with your form id, and make sure you're adding that outside of any other php tags.
This will run the shortcode to display your form through the do_shortcode function: https://developer.wordpress.org/reference/functions/do_shortcode/

How to make Wordpress Custom page

i m a newbie to wordpress. I have started theme development and encountered these problems. I think these kind of problem does have a solution, but i m not able to find it out.
I m trying to make a custom page. Uptill now i have made header, footer and main index page.
I see that whenever my theme is activated, I see these default index page, with header and footer assign to it.
I have also made some cutom about us , contact us pages using the Add Pages Functionality of wordpress.
My Problem:
1.Now I m trying to make custom product page where I will have more than 100 images on that pages, and then i can change the images, add the images and description and the link url in future. I have made some html code and put it in the text Tab . I can also see the images on the frontend of the Custom page. But my template breaks. Images goes up and description goes far below.
Also i wanted to add fancybox to all the images which are goin to be replaced or added. But again my template breaks.
So can we make custom.php page and do some coding or anything which you feel is the right way of doing it, Please let me know.
Firstly create product.php page in templates folder using below code on top
<?php
/*
Template Name: My Product Page
*/
get_header();
// write your code here
get_footer();
Then, assign the above template to the page in admin.
Then, that page you can call in menu.
For more detail, check here :- http://codex.wordpress.org/Page_Templates
Actually you don't really need to create a custom template for this unless if you are planing to use that same template on another page.
If your page name is products , just create a file called page-products.php in your theme root. and write your code inside that page.
If your planing to develop themes first be comfirtable with wp template hierarchy.
http://codex.wordpress.org/Template_Hierarchy

Adding/Importing a ready coded (AboutUs) page into Joomla

I am busy converting a HTML website into a Joomla temaplate, I got some help doing the home page (index.php), but now the menu items are not linking anywhere. I have a ready coded AboutUs.php page, which I want to important into Joomla and link to the 'About Us' menu item.
Can this be done in the similar way as it is done with the index.php file? Can I maybe upload the file via FTP and link it somehow in Joomla?
Any help on this would be much appreciated.
No it's not how joomla works.
You have to create the second menu item, link it with your content and add the extra modules that your "about us" page have.
If you don't want to do it like that you could create a new template and link each menu to different template but it's not a good approach.
If you are interested about the html part of the php site,
you can just create an article and paste html code in it (do not forget to set the editor in text mode).
If you have css, you may add it int the template's css file.
Otherwise, if you need php functionality, you need to create a joomla component.
If your going to migrate a site and use a tool like joomla i strongly suggest using it the way it was designed to be used. Otherwise theres no point.
When creating from scratch or migrating a site to joomla i would suggest firstly creating (or modifying) one or more templates to get the layout of you site; header, footer, logo, background, modules (eg. menu, login, etc) and component to load and so on.
You will have to recreate the menu items using the menu manager and apply your css to the menu module(you can download free menu modules or use the default one or develop one).
When creating a menu item you can select the template to be used and also what component you want to load (article, sitemap, blog, login, create user, etc...). An article is used to store html content which can be edited through the content manager although there are simple ways to add scripts to your articles.
If you want to add php to your content you have 4 choices.
Template (used to show content which appears on every page; this is where the html starts and ends and where the component and modules' positions are defined),
Component (this is loaded from the template depending on what menu item is selected),
Module (a very simple and easy way to add custom php and html code, can be loaded from the template or from components like in a joomla article),
Plugin (used when wanting to run scripts which dont have any visual content)

Adding my own static webpage to a wordpress site

If my title wasn't clear, basically what I'm trying to do is to add my own HTML or PHP page to Wordpress, so i can play around with some web dev.
So essentially I just want a test page/pages added to my site. However since I have installed Wordpress on my website, I can't just add "index.html" to my root folder using my FTP client. I wonder if I can/can't do this and if so how to link to the pages I add using FTP.
Sorry if this doesn't make any sense. I just want to add some of the sites I've already made / ones I am creating to my site so I can easily show clients/employers what I can do, and I apologize again if I'm being an idiot.
Create a sub-directory in your root folder and then simply link to it:
www.domain.com/mysubdir/index.php
the other way to do this... create a page template in wordpress
create a php file named: template_mypage.php
You must put this php comment line at the top of your template file:
/* Template Name: My Page */
go to wordpress backend and create a new page
in the "Page Attributes", you can find a drop down list named "Template". In the list, you should be able to find "My Page"... select it and then save your page.
view it!
You can always create a subdomain or create a folder inside public_html/www/ and redirect it from any other domain or from any static link you have on wordpress
Why not use WordPress and put your portfolio together using Custom Post Types? I recently presented on this and there is a handy plugin for Custom Post Types UI that you can create a whole new section of your site and make templates for your portfolio.
Just a thought.
If you do a static page in WordPress, you can still template using the Page system as specified in another comment. Code your page, separate it into header, footer, content, etc files. You can load the file to your root, but not name it index. If you do a subfolder, you need to not have an existing page in WordPress.
HOWEVER, you can still do a "halfway" static page still using WordPress and do a header-staticpage.php, index-staticpage.php, and footer-staticpage.php and make sure to include the code for WordPress header and footer in the new header and footer so you can still reap the benefits of the default jquery that WordPress allows. Don't forget to name your template and when you create the page in WordPress, you can just leave the content area blank if you have hardcoded the page's content in.
I still recommend trying Custom Post Types. It is not hard and there are some great presentations in Slideshare that cover this aside from the plugin I mentioned earlier in this comment.

Categories