How To make Google Form plugin appear on Homepage? - php

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/

Related

How to display custom text below site logo image with function / filter in wordpress

I needed to display my site slogan (about four words) below the site logo image, my theme author told me to add the text after certain codes in header.php. This works but my worry is that the change will be overridden after theme update because i don't use child them, i prefer using code snippet plugin to add code to my site.
I need a function / filter that i can add to my function.php to enable me achieve this without losing the change after theme update.
Can anybody help with this?
Install the PHP Code Snippet addon for WordPress, then you can put php code wherever you want on your site inline:
https://wordpress.org/plugins/insert-php-code-snippet/
From the developers site:
Insert PHP Code Snippet allows you to create shortcodes corresponding to PHP code snippets. You can create a shortcode corresponding to any random PHP code such as ad codes, login validation etc. and use the same in your posts, pages or widgets.
The shortcodes generated using the plugin are easily available as a dropdown in the standard wordpress content editor as well as in widget settings, thereby giving you ease of integrating your PHP snippets with your posts and pages.
Users Guide:
https://help.xyzscripts.com/docs/insert-php-code-snippet/user-guide/
Download link:
https://downloads.wordpress.org/plugin/insert-php-code-snippet.1.3.2.zip

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

Wordpress - creating custom pages with php code

I need to add few additional pages to my wordpress site.
These pages should not be "part of the site", ie they should not be linked somewhere from the posts and so on.
However, they should have the same header/footer as the rest of the site ( I am using custom theme ). And they should be accessible via url.
The final requirement is, I should be able to code in php.
At the moment, I tried to create a new "Page" in my admin console. And then write some php-code inside. However, all my php code gets commented and since not executed.
I don't think that installing plugins such as Exec-PHP is a good idea, so I am trying to find other solutions.
Any comments/advice/suggestions how to make it?
I would be grateful if you give me some how-to link.
Thank you in advance.
You can use a custom page template in your theme for this and just keep the site empty in the admin panel:
http://codex.wordpress.org/Theme_Development#Custom_Page_Templates
By using Template tag's you can create custom page.
write this code on the top of your php file....
/*
Template Name: Your Template Name
*/

Issue with wordpress plugin

What may be reason when i am using multiple plugins then some plugin showing in widget sidebar
but some or not like
plugin "wp-auctions" is showing in widget sidebar but
plugin "ultimate-auction" is not showing.
I am using "twentythirteen" theme.
please help me.
Well, take a look at this, http://wordpress.org/plugins/ultimate-auction/installation/
It seemed ultimate-auction is used on a page, not as a widget
Try create a new Page:
Enter this text "[wdm_auction_listing]" as a shortcode inside this new
page and publish it.
Then visit this page to see the auction list.
Goto the Admin page, choose Appearance->Widgets, check Available Widgets on the left side, ultimate-auction might be there, and you need drag it to the Main Widget Area on the right side.

wordpress use in own template

I've created an HTML page as part of my website which I would like to use as a template for news articles. The page has all the things it needs, it just needs to display the correct news article in it.
I installed WordPress on my webserver and now wonder how I can have wordpress publish articles using my HTML page?
Is this even possible since WordPress works with php?
thanks
What you are talking about is themes. Wordpress allows you to create a theme for your installation so it displays using your html/css (more or less)
The way I do this is copy the default theme and make changes in there, and then you can switch to your new theme in your settings.
Edit: in addition, you can also load up wordpress on any page using:
include( '/path_to/wordpress_install/wp-load.php' );
This will allow you to use wordpress functionality on any page of your site.
just edited the single.php file by pasting the desired html code and leaving the loop code there where the text needed to show up.
didn't need to break up the page in a header, body and footer. Left out sidebar for now, but will put it back after I edit it properly.

Categories