php Magento Wordpress主题

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php Magento Wordpress主题相关的知识,希望对你有一定的参考价值。


 /app/design/frontend/base/default/template/wordpress/post/list/renderer/default.phtml 
 
 This is where the blog index location is for WP
 Note: we are using the full size image, not the default 150x150 thumbnail:
 <img src="<?php echo $featuredImage->getFullSizeImage() ?>">
 
 
 <!--  START ==>  /app/design/frontend/base/default/template/wordpress/post/list/renderer/default.phtml  -->

<?php $post = $this->getPost() ?>
<div class="post-list-item">
	<h2><a href="<?php echo $post->getPermalink() ?>" title="<?php echo $this->escapeHtml($post->getPostTitle()) ?>">
		<?php echo $this->escapeHtml($post->getPostTitle()) ?></a>
	</h2>
	<?php echo $this->getBeforePostContentHtml() ?>
	<div class="post-entry entry<?php if ($post->getFeaturedImage()): ?> post-entry-with-image<?php endif; ?>">
		<?php if ($post->isViewableForVisitor()): ?>
			<?php if ($featuredImage = $post->getFeaturedImage()): ?>
			
				<div class="col-md-5">
					<div class="excerpt_div">
						<?php echo $post->getPostExcerpt(50) ?>
					</div>
				</div>
				
				
			<?php endif; ?>
			
			<?php if ($this->displayExcerptInFeed() || $post->hasMoreTag()): ?>
				<?php 
					/**
					* You can pass the number of words you want the excerpt to be shortened to like so
					* The below code will only show the first 50 words of the excerpt
					* <?php echo $post->getPostExcerpt(50) ?>
					*
					**/ 
				?>


				<div class="col-md-7">
					<div class="featured-image left">
						<a href="<?php echo $post->getPermalink() ?>" title="<?php echo $this->escapeHtml($post->getPostTitle()) ?>">
							<img src="<?php echo $featuredImage->getFullSizeImage() ?>" alt="<?php echo $this->escapeHtml($post->getPostTitle()) ?>"/>
						</a>
					</div>
				</div>				
				

				
				
			<?php else: ?>
				<?php echo $post->getPostContent() ?>
			<?php endif; ?>
		<?php else: ?>
			<?php echo $this->getPasswordProtectHtml($post) ?>
		<?php endif; ?>
	</div>
	<?php echo $this->getAfterPostContentHtml() ?>
</div>
<!--  END ==>  /app/design/frontend/base/default/template/wordpress/post/list/renderer/default.phtml  -->
 





以上是关于php Magento Wordpress主题的主要内容,如果未能解决你的问题,请参考以下文章

magento 主题中的页脚仅在产品中出现故障

php WordPress ::主题:: Divi儿童主题

magento 结合 wordpress之后,博客文章分类目录不显示。

Wordpress主题文件夹中的functions.php作用说明

php 在PHP / Wordpress中加载主题元素

如何在 wordpress 主题中添加自定义 php 文件