• Skip to main content
  • Skip to primary sidebar

Portomaior

Software y Tecnología

  • Inicio
  • Blog
  • Contacto
You are here: Home / Wordpress / Como añadir imagen en los post con Genesis en Wordpress

Como añadir imagen en los post con Genesis en WordPress

Antes del titulo del post

Añadir en functions.php:

add_action('genesis_before_entry', 'show_featured_image_before_title', 10);

function show_featured_image_before_title() {
   if (!is_singular('post'))
      return;
   the_post_thumbnail('large');
}
Con el plugin https://es.wordpress.org/plugins/genesis-simple-hooks/  en el código en el campo del hook  «genesis_before_entry”
<?php
      if (!is_singular('post'))
            return;
      the_post_thumbnail('large');
?>

Después del título de post

Para mostrar la imagen entre el título y el contenido del post debemos incluir el siguiente código en el functions.php

/* Show the featured image in the single posts before the content */
add_action('genesis_before_entry_content', 'show_featured_image_before_content', 10);

function show_featured_image_before_content() {
   if (!is_singular('post'))
      return;
   the_post_thumbnail('large');
}

 

En genesis-simple-hooks/ en el campo del hook “genesis_before_entry_content”

add_action('genesis_before_entry_content', 'show_featured_image_before_content', 10);

function show_featured_image_before_content() {
   if (!is_singular('post'))
      return;
   the_post_thumbnail('large');
}
Meter esto en un child theme vuestro, sino al actualizar Genesis se perderán estos cambios.

Filed Under: Wordpress

Reader Interactions

Deja una respuesta Cancelar la respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Primary Sidebar

Categorías

  • Comercio Electrónico
  • Diccionario de Informática
  • Diccionario de Marketing
  • Diccionario SEO
  • Diseño Web
  • Docker
  • Genesis Theme para Wordpress
  • Gestión de Proyectos
  • Guías Clientes
  • Hosting
  • Java
  • Linux
  • Mac
  • Odoo
  • Podcast
  • Portfolio
  • Posicionamiento SEO
  • Programación
  • React
  • Sin categoría
  • webmin
  • Windows
  • Woocommerce
  • Wordpress

Entradas recientes

  • Alternativa Windows a CCurl >> bitsadmin
  • Spring Framework de Java (redirec GKB)
  • Chuleta de Expresiones regulares. (redirec GKB)
  • Eclipse IDE
  • Java (chuleta) (redirec GKB)

Copyright © 2023 · portomaior.com · Legal · Política de Cookies · Política de privacidad · Log in