admin管理员组

文章数量:1389754

I am working on editing the theme now for our center website, we are using Benevolence WordPress Theme. My question might look too obvious to most of you but I am new to word press and spending too much time to understand this basic thing.

<div class="custom_grid_7 branding">
    <?php if (ot_get_option( 'wpl_logo' ) !== '' ) { ?>
        <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> - <?php bloginfo('description'); ?>" rel="home"> </a>
        <img src="<?php echo ot_get_option('wpl_logo'); ?>
    <?php } else { ?>
        <h1 id="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> - <?php bloginfo('description'); ?>" rel="home"> <?php bloginfo('name'); ?> </a></h1>

        <h2 id="site-description"><?php bloginfo('description'); ?></h2>
                <?php } ?>
            </div>

if someone can explain this piece of code for me? For example, I know this code is referring to the image.

  <img src="<?php echo ot_get_option('wpl_logo'); ?>

I would like to change the current image/title but I don't know where is the link of this image?

I am working on editing the theme now for our center website, we are using Benevolence WordPress Theme. My question might look too obvious to most of you but I am new to word press and spending too much time to understand this basic thing.

<div class="custom_grid_7 branding">
    <?php if (ot_get_option( 'wpl_logo' ) !== '' ) { ?>
        <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> - <?php bloginfo('description'); ?>" rel="home"> </a>
        <img src="<?php echo ot_get_option('wpl_logo'); ?>
    <?php } else { ?>
        <h1 id="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> - <?php bloginfo('description'); ?>" rel="home"> <?php bloginfo('name'); ?> </a></h1>

        <h2 id="site-description"><?php bloginfo('description'); ?></h2>
                <?php } ?>
            </div>

if someone can explain this piece of code for me? For example, I know this code is referring to the image.

  <img src="<?php echo ot_get_option('wpl_logo'); ?>

I would like to change the current image/title but I don't know where is the link of this image?

Share Improve this question asked Mar 19, 2020 at 14:50 AishaAisha 1 2
  • there might be an option under 'theme options' or somewhere under 'customize' to set the logo.. however, because the function is not a generic WordPress function but specific for your theme, it is best to ask the developers of the theme for help. third party theme questions are unfortunately off-topic here in the forum. – Michael Commented Mar 19, 2020 at 15:01
  • ot_get_option isn't a WordPress function, it looks like something from your theme or a plugin – Tom J Nowell Commented Mar 19, 2020 at 15:06
Add a comment  | 

1 Answer 1

Reset to default 1

It is not a WordPress funciton, ot_get_option is a function from the OptionTree plugin:

https://github/valendesigns/option-tree

For details on how it works internally and where it stores its data you will need ot look up options tree docs and support

本文标签: theme developmentwhere is real values of variables