• Resolved eugenealegiojo

    (@eugenealegiojo)


    Hi,

    I have installed All-in-one SEO pack. Now I want to display the home description and keywords to header and footer, respectively. Any guys here have an idea on how to do this? Please help guys.

    Thanks a lot.
    Eugene

Viewing 8 replies - 1 through 8 (of 8 total)
  • Those settings add that code to the head section of your page, not to the contents area. That is where search engines look for them. In other words, they are there but not visible within the browser.

    To see for yourself do a View Source in your browser when you are on your home page.

    If you want to add them so they are visible in header and footer you have to create custom code that reads the All in One settings from the database and displays them in the areas you want them displayed.

    It will be easier to just duplicate what you entered in All in One as HTML text in your theme’s header.php and footer.php temmplate files.

    Thread Starter eugenealegiojo

    (@eugenealegiojo)

    Thanks for the tips stvwlf, it really helped. I’ve created another function inside the aioseop.class.php that will get the homepage description and keywords, then get the return value and display description to header and keywords to footer.

    Cheers!

    Hi

    Glad it helped.

    One thing I have to say about your solution is the All in One plugin gets updated every week or two, so putting the solution in the plugin code means its going to get wiped out each time the plugin updates. You might want to create functions for header and footer in your theme’s functions.php file, and execute them within the header.php and footer.php files. That will save you from needing to restore your code to the plugin file.

    Thread Starter eugenealegiojo

    (@eugenealegiojo)

    Yes, you’re right. I almost forgot that issue. I’ll try it out. Thanks a lot.

    Thread Starter eugenealegiojo

    (@eugenealegiojo)

    Thank you so much stvwlf. It’s worked like a charm.
    Link here: https://trxrv.ca/site/

    I also use All in one SEO and would like to pass the keywords to a RSS feed. Can you tell me the code for the function you placed in your templates function.php file?

    I am able to pass the title to an RSS feed using the built in WP function the_title but have not been able to do so for the keywords.

    Thanks in advance for any help you can give!

    may i ask why you would add the keywords and description to the footer aswell as the header ??

    Thread Starter eugenealegiojo

    (@eugenealegiojo)

    trman,

    You can use like this:

    <?php if(function_exists('aiosp_meta')) : ?>
    				<?php $description = stripcslashes(get_post_meta($post->ID, '_aioseop_description', true)); ?>
    				<?php if(!empty($description)) : ?>
    						<div id="text_content">
    							<p> <?php echo $description; ?></p>
    						</div>
    				<?php endif; ?>
    			<?php endif; ?>

    Hope it helps.

    PS.
    spotcream,

    As per required by the client.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘All in one SEO pack – how to display keywords?’ is closed to new replies.