wordpress-theming

Get the name of the first category

偶尔善良 提交于 2021-02-18 22:47:26
问题 I am trying to create a single page that lists the content of each category. I have managed to create the list. I now need to get the name of the category. I have the following code: <ul> <li> CATEGORY NAME HERE </li> <?php query_posts('cat=0'); ?> <?php while ( have_posts() ) : the_post(); ?> <li> <a href="<?php echo get_permalink(); ?>"> <?php the_title(); ?></a> </li> <?php endwhile; ?> </ul> How to call the name of the first category (0)? Current edit : Why won't multiple works? <div

Get the name of the first category

三世轮回 提交于 2021-02-18 22:46:29
问题 I am trying to create a single page that lists the content of each category. I have managed to create the list. I now need to get the name of the category. I have the following code: <ul> <li> CATEGORY NAME HERE </li> <?php query_posts('cat=0'); ?> <?php while ( have_posts() ) : the_post(); ?> <li> <a href="<?php echo get_permalink(); ?>"> <?php the_title(); ?></a> </li> <?php endwhile; ?> </ul> How to call the name of the first category (0)? Current edit : Why won't multiple works? <div

Wordpress loop with different bootstrap columns

ぐ巨炮叔叔 提交于 2021-02-11 15:33:03
问题 i need to create a wordpress loop where the first post will be col-md-12 and the next 4 posts will be col-md-6 <div class= "col-md-12"> </div> <div class= "col-md-6"> </div> <div class= "col-md-6"> </div> <div class= "col-md-6"> </div> <div class= "col-md-6"> </div> and then <div class= "col-md-12"> </div> <div class= "col-md-6"> </div> <div class= "col-md-6"> </div> <div class= "col-md-6"> </div> <div class= "col-md-6"> </div> 回答1: may be this can help : <?php if ( have_posts() ) { $counter

wordpress add featured image below post title

十年热恋 提交于 2021-02-10 18:37:27
问题 I try to display a featured image below the blog-post title. actually my posts look like: WP-header post-title date | author | comments post content tag | category My goal is to get a full-sized-image (featured image) between post-title & date | author | comments Actually I am using a Corpo Theme. Any ideas? Best Regards 回答1: You can fetch featured image using following code and paste it after post-title which should be <?php the_title() ?> <?php if ( has_post_thumbnail()) { $large_image_url

wordpress add featured image below post title

假如想象 提交于 2021-02-10 18:29:28
问题 I try to display a featured image below the blog-post title. actually my posts look like: WP-header post-title date | author | comments post content tag | category My goal is to get a full-sized-image (featured image) between post-title & date | author | comments Actually I am using a Corpo Theme. Any ideas? Best Regards 回答1: You can fetch featured image using following code and paste it after post-title which should be <?php the_title() ?> <?php if ( has_post_thumbnail()) { $large_image_url

Woocommerce Shop show categories

柔情痞子 提交于 2021-02-08 05:23:45
问题 I am new to wordpress so please still help with me if I get the language wrong. Using woocommerce to display a shop with variable products, I would like the shop link landing page to display the shop categories with the featured image of that category. My current shop page displays all products, with a pagination to other product pages and I cannot find the template for all products. When I go to shop page in wp-admin and click on the edit page it is empty, so am not sure how they are getting

Woocommerce Shop show categories

丶灬走出姿态 提交于 2021-02-08 05:23:10
问题 I am new to wordpress so please still help with me if I get the language wrong. Using woocommerce to display a shop with variable products, I would like the shop link landing page to display the shop categories with the featured image of that category. My current shop page displays all products, with a pagination to other product pages and I cannot find the template for all products. When I go to shop page in wp-admin and click on the edit page it is empty, so am not sure how they are getting

How to avoid php countable errors on what appear to be valid arrays

旧巷老猫 提交于 2021-01-28 08:03:20
问题 I'm getting a php count() error, 'Warning: count(): Parameter must be an array or an object that implements Countable' on what is clearly an array. The code still works, but I'd like to know how to recode to avoid the warning messages. First, I have a multidimensional array (print_f dump): $icons Array ( [0] => Array ( [image] => 12811 [label] => Chemical [categories] => Array ( [0] => 209 ) ) [1] => Array ( [image] => 12812 [label] => Cut [categories] => Array ( [0] => 236 ) ) [2] => Array (

How can I make a Divi theme dropdown in WordPress stay open until I click?

一世执手 提交于 2021-01-07 06:35:35
问题 I have a WordPress site using the Divi theme. I have a dropdown in the navbar that I want to stay open until I click somewhere with the mouse. My trouble is, I don't understand the CSS of the dropdown. I don't know which CSS class to use for opening/closing the dropdown programatically. Here is the site that I'm working on: https://sprider.se.knowe.work/ The dropdown is the lime green one in the top right of the page with label "Våra erbjudanden", see the screenshot: So in short, which Divi

The package could not be installed. The theme is missing the style.css stylesheet

依然范特西╮ 提交于 2020-12-30 03:41:47
问题 I am beginner in WordPress and trying to install theme in it. But I am getting The package could not be installed. The theme is missing the style.css stylesheet. error when I am uploading main .zip file. After getting this solutions I am not able to get Theme folder or .zip file in main folder... my main folder directory is Please anybody suggest me, what should I do? 回答1: Copy caliope folder into ~wordpress_installation_folder/wp-content/themes If you are installing this folder it won't