<?php
// the_post_thumbnail( 'post-image' );
$myEyeCatch_attr = array(
'src' => $src,
'class' => "attachment-$size",
'alt' => trim( strip_tags( $wp_postmeta->_wp_attachment_image_alt ) ),
'align' => "left",
'style' => "margin:0 10px 0 0;"
);
the_post_thumbnail( 'thumbnail' , $myEyeCatch_attr );
?>
Version:Featured Image from URL:2.5.4;
Site:https://motpresse.votre.space;
Theme:Lovecraft 1.30;
Plugins:Akismet Anti-Spam (akismet), All In One SEO Pack (all-in-one-seo-pack), Classic Editor (classic-editor), CSS & JavaScript Toolbox (css-javascript-toolbox), Featured Image from URL (featured-image-from-url), Google XML Sitemaps (sitemap), Merge + Minify + Refresh (merge-minify-refresh), Movable Type and TypePad Importer (movabletype-importer), Nelio External Featured Image (discontinued) (nelioefi), Really Simple SSL (really-simple-ssl), WordPress Ping Optimizer (wordpress-ping-optimizer), WP Multibyte Patch (wp-multibyte-patch);
PHP:7.1.30;
WooCommerce:;
WordPress:5.2.2;
Pages:3;
Posts:30;
Products:;
fifu_auto_alt:toggleon;
fifu_column_height:64;
fifu_content:toggleoff;
fifu_content_page:toggleoff;
fifu_css:;
fifu_data_clean:toggleoff;
fifu_data_generation:toggleoff;
fifu_default_url:;
fifu_enable_default_url:toggleoff;
fifu_fake:toggleoff;
fifu_fake2:toggleon;
fifu_get_first:toggleoff;
fifu_grid_category:toggleoff;
fifu_hide_page:toggleoff;
fifu_hide_post:toggleoff;
fifu_image_height_arch:;
fifu_image_height_cart:;
fifu_image_height_ctgr:;
fifu_image_height_home:;
fifu_image_height_page:;
fifu_image_height_post:;
fifu_image_height_prod:;
fifu_image_height_shop:;
fifu_image_width_arch:;
fifu_image_width_cart:;
fifu_image_width_ctgr:;
fifu_image_width_home:;
fifu_image_width_page:;
fifu_image_width_post:;
fifu_image_width_prod:;
fifu_image_width_shop:;
fifu_lazy:toggleoff;
fifu_original:toggleoff;
fifu_ovw_first:toggleoff;
fifu_pop_first:toggleoff;
fifu_priority:toggleoff;
fifu_save_dimensions:toggleoff;
fifu_save_dimensions_all:toggleoff;
fifu_social:toggleoff;
fifu_wc_lbox:toggleoff;
fifu_wc_zoom:toggleoff;
]]>I have template-parts/post/content.php that works okay
For testing purposes I replaced the original content.php path to the child folder in index.php
//get_template_part( 'template-parts/post/content', get_post_format() );
get_template_part( '../twentyseventeen-child/template-parts/post/content', get_post_format() );
All works fine but I have to keep the original index.php and “Include the Post-Format-specific template for the content….” but I don’t know how/where to do that.
Thanks.
I like the Shop Isle theme, but either it is too complicated/layered or do versions of WordPress themes since 2016 require an additional level of abstraction?
WHAT I TRIED ALREADY:
I checked search.php, which seemed like an intutive place to keep the code for search results. But, the code was not there. Instead it led me to another file called content.php, but the code to edit wasn’t in that file either. I even wrote a blog post about my struggle here: https://erichepperle.com/developer-journal-wp-shop-isle-search-excerpts/
This is all it says in content.php:
<div <?php post_class( 'post' ); ?> id="post-<?php the_ID(); ?>">
<?php
/*
* @hooked shop_isle_post_header() - 10
* @hooked shop_isle_post_meta() - 20
* @hooked shop_isle_post_content() - 30
*/
do_action( 'shop_isle_loop_post' );
?>
</div><!-- #post-## -->
It seems that “@hooked shop_isle_post_content()” or “shop_isle_loop_post” are the important lines of code. But neither of these correlate with a php filename.
I’m stumped. Any help is appreciated.
]]>The Content Area Was Not Found in Your Page
I have tried creating the functions.php and index.php in my child theme and adding the line <?php the_content(); ?> but no go.
It only works when i add the same in header.php but the editing worspace is above the header area which doesnt help. Please help me. Thanks in advance.
the text that shows up to navigate to older posts and newer posts, I want to change that text to some other labels.
I see where that is called on content.php and searched thru css to see if there is a label for before and after there but can’t find it.
Thanks, like the theme. Clean!
]]>Link to the site: www.platypusabandon.com/wp
I’ve tried a bunch of variations (including a random word as a test in case my div was off, and in different places in the code), and nothing seems to work in having the date show up in both places.
Here is the code I am currently using (from content.php):
<header class="entry-header">
<div id="entry-meta"> <span class="date"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( get_the_time() ); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a></span> </div>
<?php
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
endif;
?>
</header><!-- .entry-header -->
Note that the date also successfully shows up if you search by category…but not if you do a regular search.
I would be grateful if someone could help — thanks so much!
]]>I would like to include this code in my content.php file:
if ( in_category( array('Political Cartoons', 'Political Statements' ) )) {
<?php the_time('F jS, Y') ?>
elseif ( in_category( array('Scripture', 'Biblical', 'Biblical Resources', 'Quotes', 'Holidays/Anniversaries', 'Article', 'Political', 'Political Literature', 'Political Terms', 'Admin') )) {
Posted by <?php the_author_posts_link(); ?> | <?php the_time('F jS, Y') ?>
else {
Written by <?php the_author_posts_link(); ?> | <?php the_time('F jS, Y') ?>
endif;
The problem is, I’m not sure how to make all of the condition statements work correctly. If someone could help me tweak it so that it will work correctly, I would really appreciate it.
]]>Originally, the theme was designed to display, in this order:
1. Featured image
2. Post header
3. Post date, # of comments
4. Excerpt
In my child theme I have managed to alter the content.php to rearrange the display to:
1. Post header
2. Post date, # of comments
3. Featured image
4. Excerpt
However, I would also like the image to float left. I cannot figure out how to do this, whether I can do this in the content.php or if I have to also alter the CSS. Any help would be appreciated.
Here is the code for content.php:
<?php
/**
* The default template for displaying content
*
* Used for both single and index/archive/search
*
* @package Catch Themes
* @subpackage Clean Box
* @since Clean Box 0.1
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-container">
<header class="entry-header">
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php if ( 'post' == get_post_type() ) : ?>
<?php clean_box_entry_meta(); ?>
<?php endif; ?>
</header><!-- .entry-header -->
<div class="archive-post-wrap">
<?php
/**
* clean_box_before_entry_container hook
*
* @hooked clean_box_archive_content_image - 10
*/
do_action( 'clean_box_before_entry_container' );
// Get the Excerpt
$cleanbox_excerpt = get_the_excerpt(); ?>
<?php
$options = clean_box_get_theme_options();
if ( is_search() || ( 'full-content' != $options['content_layout'] && !empty( $cleanbox_excerpt ) ) ) : // Only display Excerpts for Search and if 'full-content' is not selected ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content(); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links"><span class="pages">' . __( 'Pages:', 'clean-box' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
) );
?>
</div><!-- .entry-content -->
<?php endif; ?>
<footer class="entry-footer">
<?php clean_box_tag_category(); ?>
</footer><!-- .entry-footer -->
</div><!-- .archive-post-wrap -->
</div><!-- .entry-container -->
</article><!-- #post -->
]]>I want to insert php and other codes (e.g Google Adsense) in index.php?
I would like to insert this before endwhile but it doesn’t work:
` <?php if( $wp_query->current_post == 0 ) {
ADSENSE CODE
}?>`
<?php if ( have_posts() ) : ?>
<?php if ( is_home() && ! is_front_page() ) : ?>
<header>
<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
</header>
<?php endif; ?>
<?php
// Start the loop.
while ( have_posts() ) : the_post();
/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
// End the loop.
endwhile;
// Previous/next page navigation.
the_posts_pagination( array(
'prev_text' => __( 'F?reg?ende sida', 'twentyfifteen' ),
'next_text' => __( 'N?sta sida', 'twentyfifteen' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Sida', 'twentyfifteen' ) . ' </span>',
) );
// If no content, include the "No posts found" template.
else :
get_template_part( 'content', 'none' );
endif;
?>
Content.php
How can I insert code after ‘the_content( sprintf(‘ but before the “keep reading” here:
<div class="entry-content">
<?php
/* translators: %s: Name of current post */
the_content( sprintf(
__('Keep reading %s', 'twentyfifteen' ),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Sidor:', 'twentyfifteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . __( 'Sida', 'twentyfifteen' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
) );
?>
</div><!-- .entry-content -->
Thanks for any help!!
]]>