WordPress.org

Ready to get started?Download WordPress

Forums

Worspress structure to modify header image (12 posts)

  1. lastninja
    Member
    Posted 1 year ago #

    Hi all,
    sorry for the basic questione but I dont know where to find.
    I want to modify a theme header to change the image with a slideshow.
    In the administratione panel it is impossible. I dont know what file I have to modify.

    Thanks

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    You'll need a Child Theme for this kind of work.

    Then copy the header.php file from your actual theme & paste it in your Child Theme directory.

    You can then modify that header.php file in your Child Theme directory.

  3. lastninja
    Member
    Posted 1 year ago #

    Tks for the reply, very useful,but I cannot still understand where to insert my code. My header.php file ends with:

    <link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" />
    <?php endif; ?>
    <?php wp_head(); ?>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/script.js"></script>
    </head><?php } ?>
    <body <?php if(function_exists('body_class')) body_class(); ?>>
    <?php
    ob_start();

    I know that ob_start() is useful for data streaming, but what data exactly? So what the file I have to modify?

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Do you have the child theme set up? What theme are you using?

  5. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    where did you download that theme from?

    what is the code of index.php of your theme?

  6. lastninja
    Member
    Posted 1 year ago #

    Yes I set it now. The theme is "Agriculture Meadow"

  7. lastninja
    Member
    Posted 1 year ago #

    The index.php is:

    <?php
    wp_get_header();
    
     if (have_posts())
     {
        while (have_posts())
        {
          art_post();
        }
        art_page_navi();
     } else {
        art_not_found_msg();
     }
    
    wp_get_footer();
  8. Can I convince you to switch to a theme from here and try your question again?

    http://wordpress.org/extend/themes/

    Or at least post a link to your site?

    The reason it's important to know where you got that theme is because the place that I found it contains really E-V-I-L obfuscated code in the functions.php file on the site that I found it.

    If you got that from a web site that has the letters generic and wp and themes then you should delete it now. They've some really bad things there and we don't support any of those themes here.

    I'm really hoping you got the theme from the WordPress repo here. ;)

  9. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    unfortunately, your current theme is not released under GPL, and is therefore not supported by this forum.

    try contacting the theme's download site for support.

  10. lastninja
    Member
    Posted 1 year ago #

    The site is:

    http://www.bewater.it/cerealbrenta/

    Maybe I downloaded it from here:

    http://[ redacted that site is not welcomed here ]/theme/agriculture-meadow.html

    Tell me more about obfuscated code...

  11. Obfuscated code is PHP code that you cannot decipher. The theme author is hiding Very Bad Things there and that is not GPL friendly at all.

    You should not run any code that you can't verify yourself by looking at the source code. They're trying to do things with your blog that you would not do yourself and without your permission.

    You can read about some of those dangers at this often quoted link.

    http://www.chipbennett.net/2010/12/10/only-download-wordpress-themes-from-trusted-sources/

    Best to be safe and avoid that site like a bad infection.

  12. lastninja
    Member
    Posted 1 year ago #

    Thanks for the help

Topic Closed

This topic has been closed to new replies.

About this Topic