Where to Add Code for Index/Home Page

WordPress Business Themes Forums Version 7 Themes DirectoryPress Where to Add Code for Index/Home Page

Where to Add Code for Index/Home Page

July 27, 2013
Claudia Claudia
  • Claudia
    Claudia
    Newbie 70 points

    I want to insert the code for implementing the AddThis service. But not sure which page in the WP Editor to edit and insert the code.

    I know technically, we should not edit any of the .php files.

    So please direct me to the page to edit.

    I am also trying to add code on this same page for the ‘Who Hit the Page’ plugin. This code is supposed to go into a post area, but the code is showing as text, so I would like to place it directly on the html/template pages themselves. This is the code: [whohit]-Page name or identifier-[/whohit] – but when I put it into the >Display Settings >Home Page >Home Page Text Box and also tried it on other regular pages, the code shows as text.

    Please advise on both of these if possible.

    Thanx! :)
    Claudia Beck

    July 27, 2013 at 10:02 pm
  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points

    What sort of code? The placement is dependent on the code you use. Also do not use WP editor to edit files as this can cause issues. If you want to make changes to your theme, use child theme.

    Kind regards,

    Richard
    _____________________________________________________________________
    Wide range of PremiumPress and WordPress Plugins and add-ons
    PremiumPress customisation services and Website Design
    Selection of PremiumPress Child Themes

    July 27, 2013 at 10:53 pm
  • Claudia
    Claudia
    Newbie 70 points

    The code is the AddThis generated code for the Follow and Share Icon bars to get activated and show up.

    The reason I am trying to use AddThis is because in the Directory Press under >General Setup >Default Settings >Misc/Extras there is a drop down menu to enter our AddThis username or set it to ‘Off’. (www.addthis.com) So I entered my AddThis username and nothing happened so I am — assuming — that we still need to upload the code as seen below and instructed by ‘AddThis’ admin area.

    ????????????????????? Anyone else using this plugin on Directory Press? ???????????

    ———-

    <!– AddThis Smart Layers BEGIN –>
    <!– Go to http://www.addthis.com/get/smart-layers to customize –>
    <script type=”text/javascript” src=”//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51f1a4933a03c3f8″></script>
    <script type=”text/javascript”>
    addthis.layers({
    ‘theme’ : ‘transparent’,
    ‘share’ : {
    ‘position’ : ‘right’,
    ‘numPreferredServices’ : 6
    },
    ‘follow’ : {
    ‘services’ : [
    {‘service’: ‘facebook’, ‘id’: ‘SunSeaPromos’},
    {‘service’: ‘twitter’, ‘id’: ‘SunSeaPromos’},
    {‘service’: ‘linkedin’, ‘id’: ‘sunseapromos’},
    {‘service’: ‘google_follow’, ‘id’: ‘11404700986286077412’}
    ]
    }
    });
    </script>
    <!– AddThis Smart Layers END –>

    ——————————-

    July 28, 2013 at 4:25 am
  • Mark Fail
    Mark Fail
    Super Guru 12,812 points

    Claudia which child theme are you using?

    some of them remove the display so this maybe the cause. A link would be great.

    July 28, 2013 at 5:09 am
  • Claudia
    Claudia
    Newbie 70 points

    Hi – I am using Clean Directory (blue, English).

    It’s at: http://christiansinbusinessdirectory.com

    Thank you. :)

    July 28, 2013 at 5:12 am
  • Ian
    Ian
    Super Guru 1,200 points

    The addthis code is already in the listing page and shows as a ‘Share’ button.

    Attachments:
    You must be logged in to view attached files.
    July 28, 2013 at 5:16 am
  • Mark Fail
    Mark Fail
    Super Guru 12,812 points

    have u turned the ‘addthis’ on in your admin and given it a username?

    July 28, 2013 at 5:16 am
  • Ian
    Ian
    Super Guru 1,200 points

    Even in Clean Directory (Blue, English)

    July 28, 2013 at 5:18 am
  • Ian
    Ian
    Super Guru 1,200 points

    Also you need to go to Display Settings>Search/Listing Page>Listing Page Options and make sure that the option Social Booking Tools is set to ‘Show’ and even if it is click on ‘Save’ as it doesn’t show until those options have been saved once.

    July 28, 2013 at 5:21 am
  • Ian
    Ian
    Super Guru 1,200 points

    I don’t think it’s on the Homepage anywhere so if you want it to show there you’d have to create a _hompage.php in your child theme and add the code to it.

    July 28, 2013 at 5:51 am
  • Claudia
    Claudia
    Newbie 70 points

    Okay, the Share is there, I see for the listings. But I am wanting to get the Follow Buttons up on my site itself as seen here:
    https://www.addthis.com/get/follow#.Ufc5JlPjScM

    This is what I am trying to upload the code for.

    So that is what I will need to create a _hompage.php in my theme for?

    Would I just create a blank page, call it that and upload it via .ftp with the code on it?

    Not familiar with .php programming, but I do make websites using DreamWeaver and I can easily create a page, add code and upload it anywhere.

    Thanx! again ~ :)

    July 30, 2013 at 4:00 am
  • Claudia
    Claudia
    Newbie 70 points

    The smart layers is what I am trying to do – it’s actually shown on this page:
    https://www.addthis.com/get/smart-layers#.Ufc8JlPjScM.

    Sorry, the other link was the wrong page.

    But, I am going to try to add this another way and see what happens. I’ll let you know, thanx! for the tips. :)

    July 30, 2013 at 4:09 am
  • Claudia
    Claudia
    Newbie 70 points

    Aha – got it!

    I simply went to >Display Settings >Home Page >Active Home Page Objects and I have the ‘Home Page Text’ block active.

    I clicked the link for editing that, then in the text editory, clicked the ‘text’ tab and pasted the embed code I got from the AddThis site for the Smart Layers feature at the very bottom of this page.

    Worked great. Thank you all for your time and patience. I have worked with a multitude of scripts before, this one is new to me so I am just learning my way around.

    :)

    July 30, 2013 at 4:16 am
  • Claudia
    Claudia
    Newbie 70 points

    Oh, here’s the link to my site so you can see the social buttons:
    http://christiansinbusinessdirectory.com/

    July 30, 2013 at 4:18 am
  • Ian
    Ian
    Super Guru 1,200 points

    Well done for working that out but…I don’t see any social buttons 😕

    July 30, 2013 at 6:06 am
Viewing 15 posts - 1 through 15 (of 18 total)

Didn't find what you were after?

Chat with us now

or contact our support team