I'm a Wordpress newbie. I want to add a widget from another site onto my Wordpress website.
Here is the snippet:
<script type="text/javascript"
src="http://www.freshcontent.net/canada_news_feed.php"></script>
It will create something like a ticker on my site. I know how to add custom html to my posts. But, how do I make this show up on every page of my site? Are there tutorials for something similar to this?
Log into the dashboard, click on "Appearance" in the menu on the left, then choose "Widgets" and "Text". Choose the widget area you want it to appear in (these are theme-dependent, but can be customized any way you like), and then click "Add Widget".
Add a title, paste in your HTML, and click "Save". That's all there is to it.
Related
I purchased a WP theme https://themeforest.net/item/pressville-municipal-wordpress-theme/19949423 and need to add general content area to the People page: https://preview.themeforest.net/item/pressville-municipal-wordpress-theme/full_screen_preview/19949423?_ga=2.67243158.624148492.1570058772-1881232054.1569979687
The People page is actually a section in the WP dashboard (kind of like Media or Portfolio section) so technically not a editable page in the WP backend. I contacted the theme creator and was told that it's customization (not included w/theme) and advised to hard code text into the php. The problem with that is it's not accessible to other users who have no design or code background.. Is there a way to create a page with editable content block for this People section so it's easily editable without knowing code?
Also, the “People” header text changes if you click on subcategories (to “Elected Officials”) for example. When you click a subcategory, the main menu (People page) no longer shows as active which can be confusing to users. Is there a way to fix this so header stays consistent (like Contact page header) and menu item shows active regardless of what subcategory(All, Elected Officials, etc) is selected on the People page? Thanks.
You can create a regular page called "People's page" and add text to it. Then if you want to show that page's content into a PHP template you can do the following:
Step 1. Create the Function
Open up your theme’s functions.php file and paste the following code, likely at the bottom of the page.
function cn_include_content($pid) {
$thepageinquestion = get_post($pid);
$content = $thepageinquestion->post_content;
$content = apply_filters('the_content', $content);
echo $content;
}
Step 2. Use the Function in a Template File
Next, open up the specific template file you want to include the Page’s content on and paste in the function:
<?php cn_include_content(31); ?>
Replace 31 with the ID of the Page you want to include. How to find a page ID.
Is sounds like you need to go to your wp-admin and click appearance/ menus. Here you can remove these menu items that might be default but have no pages associated with them. You can then add the pages you want and come back and create a custom menu. Hope that answers the first part of your question.
I have probably missed something but I have been trying to work out what and I am having no luck.
I have added a new page template to my wordpress site, created a new widget area (necessary as this is how the original designer built the site).
However, the page appears to be calling content from another widget area.
The page in question is http://www.haylockpittman.co.uk/builders-painters-decorators-and-refurbishment-contractors-surrey/ and it appears to be calling widget area "New Paint" despite the code calling for "paint surrey" which contains the correct text for the widget area.
For note the widget area is basically the bottom half of the page.
I hope someone might be able to help me get my head round this.
Thanks
As you have created a separate sidebar, now you must be seeing that in your admin panel.
So just add the widgets you want to appear in the sidebar.
Next go to your sidebar.php page, there you cana put a condition i.e. for the products page
If your products page is a separate template then use the name of the file i.e.
if ( is_page_template('your-template.php') ) {
register_sidebr('name of the sidebar');
} else {
register_sidebr('name of the sidebar');
}
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.
Recently i have a requirement from client as he want dynamic sidebar (Text-Widget) content show over the Home Page. So, what ever he enter into text box i.e Link, Image or Text that should be come up over home page.
Can anybody give me hint to show Widget Content over Home or any Page?
Use this plugin Widget Logic
This plugin gives every widget an extra control field called "Widget logic" that lets you control the pages that the widget will appear on. The text field lets you use WP's Conditional Tags, or any general PHP code.
I am using the newest version of WordPress (version 2.8.4)
I'm wondering how I would add an additional page.
I have a navigation that looks something like this.
home | about us | contact us | ... etc.
I read somewhere to go to pages -> add new but it forces me to put the content within WordPress rather than edit a PHP file itself.
How would I be able to enter PHP in it? Is there something else I can do?
For example if you want to add home, "About us" pages:
You have to create template pages for this.
For this you need 3 files: header.php, index.php and footer.php.
If you are using an existing theme, you will find these three files in your theme folder itself.
For creating your home page, copy the following into your index.php file:
<?php get_header(); ?>
<body>
/* include whatever u want in ur body tag */
<?php get_footer(); ?>
index.php will be automatically assigned to home page.
For the "about us" page, create a file named aboutus.php (whatever name you want with .php
extension) and copy and paste this code.
<?php
/**
* Template Name: aboutus //don't forget to add this name according to ur page name
*
* Selectable from a dropdown menu on the edit page screen.
*/
?>
<?php get_header(); ?>
<body>
/* whatever u want in ur body tag */
<?php get_footer(); ?>
Then go to dashboard of your website or blog, there click pages->Add new,
give the Title as Home. Then click publish button on right side of the (Add new page) window.
Then, on left side of the screen, again click pages->add new, then enter title as "about us"
and then, in right side of this window, you will see a dropdown box named template, click the dropdown and select "about us" from it. Then click publish button.
Now we are going to create menus to appear in the website or blog. For this,
On left side of window,click Appearence->Menus.
On left side down of window you will see Pages heading, in that click Most
Recent, check home, aboutus pages and click Add to Menu button.
Then, the selected pages are displayed on right side and click Save Menu button on right corner.
Then, on left top corner, click your website or blog name to view your website with the two menus with their pages.
Create a Template in your theme folder, then set the page to use that.
If you want to do it without creating a Template, you may be able to use a plugin such as Exec-PHP, however this brings with it a bunch of possible security issues.
Why do you want a content page outside of Wordpress and outside of the WP loop? You still need to use a template and WP includes or you'll run into permalink problems.
You can make a WP page but exclude it from navigation, if that's what you're after, with something like Exclude Pages.
I'm a bit confused about what you're asking, but if what you're looking for is a way to have a link in your WordPress navigation that goes to a page you create outside of WordPress, you can use this plugin:
http://wordpress.org/extend/plugins/page-links-to/
If this and the other answers aren't any help, you might want to edit your question to clarify what you're trying to do with the php.
Good luck!