wordpress-theming

Change number of posts on consecutive category pages (Wordpress)

大憨熊 提交于 2019-12-02 04:10:54
I am trying change the number of posts that are displayed on a category pages to change on consecutive pages (page 2, 3, etc). So page one displays 7 posts, but pages 2, 3 and 4, etc of that category display only 6 posts per page (i.e. when you click 'next page' to list the older posts). I am aware that it is relatively straightforward to change the number of posts for different categories / archive pages - but this is different, as I would like the paginated pages to have different numbers of posts. Any ideas? Pieter Goosen This is from an answer I recently done on WPSE. I have made some

WordPress Child Theme - General Understanding

混江龙づ霸主 提交于 2019-12-02 03:54:57
问题 I am trying to understand how to use a Child Theme in wordpress. I am afraid that something will go wrong in the process of developpment because I haven't completely understood how to use the child theme or its integration wasn't done properly. My confusion comes after I create the child theme and by adding the style.css and functions.php. At this point, can I make any changes that I want to the child theme and it will still work? For example, After I modify the front-end of the website with

need help in using get_the_tag_list($ID) WordPress

只谈情不闲聊 提交于 2019-12-02 03:25:50
问题 I am making a new WordPress template and I want to just get, in text format, the list of tags associated with a post. I am using get_the_tag_list($id) But the problem is that it returns the URL as well as the text. Is there any way to just get the "text" of tags attached to a post seperated by a comma ? i.e. tag1, tag2, tag3, tag4 etc without the URL and just as text? Thanks 回答1: The template tag get_the_tags() returns an array of all of the tags associated with the post currently in-context

How to create pagination in page code in wordpress?

时光毁灭记忆、已成空白 提交于 2019-12-02 03:24:18
Hi all I am a new of wordpress I want to create pagination in page but still can not . I try to download plugin or add code and serch in google in youtube but I still can not do it who can help me please ? this is my page code: <?php $zerif_total_posts = get_option('posts_per_page'); /* number of latest posts to show */ if( !empty($zerif_total_posts) && ($zerif_total_posts > 0) ): echo '<section class="latest-news" id="latestnews">'; echo '<div class="container">'; /* SECTION HEADER */ echo '<div class="section-header">'; $zerif_latestnews_title = get_theme_mod('zerif_latestnews_title'); /*

WordPress Child Theme - General Understanding

两盒软妹~` 提交于 2019-12-02 01:39:02
I am trying to understand how to use a Child Theme in wordpress. I am afraid that something will go wrong in the process of developpment because I haven't completely understood how to use the child theme or its integration wasn't done properly. My confusion comes after I create the child theme and by adding the style.css and functions.php. At this point, can I make any changes that I want to the child theme and it will still work? For example, After I modify the front-end of the website with the use of the child theme, I want to add some forms that will insert data into the database. Do I have

Failed to import “Contact form 1”: Invalid post type wpcf7_contact_form Failed to import Media “db_site.sql_.txt”

心不动则不痛 提交于 2019-12-02 00:15:24
I'm new to web development specially with wordpress. I created a website using wordpress as cms framework. I imported a database to my wordpress dashboard, all went well but the problem was some of the content was never imported successfully and the message is this, "...Failed to import Media “db_site.sql_.txt” and Failed to import “Contact form 1”: Invalid post type wpcf7_contact_form.." what could be the problem with this? I appreciate any help from you. Thanks!..=) You are missing the required WordPress plugin: install and activate plugin Contact Form 7 import the theme again... I'm a new

need help in using get_the_tag_list($ID) WordPress

点点圈 提交于 2019-12-02 00:06:58
I am making a new WordPress template and I want to just get, in text format, the list of tags associated with a post. I am using get_the_tag_list($id) But the problem is that it returns the URL as well as the text. Is there any way to just get the "text" of tags attached to a post seperated by a comma ? i.e. tag1, tag2, tag3, tag4 etc without the URL and just as text? Thanks The template tag get_the_tags() returns an array of all of the tags associated with the post currently in-context within the Loop. You could traverse this array and generate a comma-separated list by hand. Here's an

Wordpress Bones Theme CSS and JS Versioning

狂风中的少年 提交于 2019-12-01 23:42:08
问题 I have a website that has been built using the bones wordpress theme. No matter what I do I can't seem to get versioning to work on css and js using the wordpress enqueue functions. Is there something in bones, maybe a filter that I can't find that is stripping the versioning out? Any suggestions are appreciated. Thanks 回答1: You're probably lucky that it's not there by default, most people try and remove it as it defaults to Wordpress version number (why?). I found the best way to add it is

Wordpress CSS and JS Version Numbers Not Working

≡放荡痞女 提交于 2019-12-01 22:03:33
问题 I am trying to figure out why the version number query string is not being included in any of my JS or CSS files that I set. I have looked through all documentation and tried different methods. I have even tried just removing the version and Wordpress won't add it's own version. Was hoping to get any other ideas to try from someone so I can cache break Cloudflare easier. wp_enqueue_style( 'theme-stylesheet', get_template_directory_uri() . '/assets/css/style.css', false, '1.0' ); wp_register

Wordpress CSS and JS Version Numbers Not Working

拜拜、爱过 提交于 2019-12-01 21:21:25
I am trying to figure out why the version number query string is not being included in any of my JS or CSS files that I set. I have looked through all documentation and tried different methods. I have even tried just removing the version and Wordpress won't add it's own version. Was hoping to get any other ideas to try from someone so I can cache break Cloudflare easier. wp_enqueue_style( 'theme-stylesheet', get_template_directory_uri() . '/assets/css/style.css', false, '1.0' ); wp_register_script( 'theme-scripts', get_template_directory_uri() . '/assets/js/blacklab.min.js', array( 'jquery' ),