dostępne shortkody dla wtyczki Display Posts Shortcode

przykład:

https://github.com/billerickson/display-posts-shortcode/blob/master/README.md#display-posts-shortcode

Display Posts Shortcode

Contributors: billerickson
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MQKRBRFVRUV8C
Tags: shortcode, pages, posts, page, query, display, list
Requires at least: 3.0
Tested up to: 4.6.0
Stable tag: 2.7.0

Display a listing of posts using the

shortcode

Description

The Display Posts Shortcode was written to allow users to easily display listings of posts without knowing PHP or editing template files.

Add the shortcode in a post or page, and use the arguments to query based on tag, category, post type, and many other possibilities. You can also customize the output with parameters like: include_date, include_excerpt, and image_size.

Installation

  1. Upload display-posts-shortcode to the /wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Add the shortcode to a post or page.

Parameters

author
Specify the post author
Default: empty
Example:

category
Specify the category slug, or comma separated list of category slugs
Default: empty
Example:

category_display
Specify ‚true’ to display the categories the current post is in. Specify a taxonomy slug (e.g., ‚post_tag’) to list a different taxonomy
Default: empty
Example:

category_label
If using category_display, specify the label that appears before the list of categories.
Default: „Posted in: ”
Example:

content_class
Specify the class name used for the post content
Default: content
Example:

  • Śledzenie kliknięć w numer telefonu GA

    Z pomocą Google Tag managera: https://www.optimizesmart.com/event-tracking-in-google-tag-manager-v2-complete-guide/

    Z pomocą Google Analytics: https://digitalshiftmedia.com/google-analytics-event-tracking/

  • Informacja o cookies -z CDN

    Dodać w footer.php przed zamknięciem znacznika body:

    dd
    https://cdn.rawgit.com/designvkp/CookieInfoScript/68f31f13/cookieinfo.min.js
    
  • usuwanie url z indeksu przez google search console

    https://www.google.com/webmasters/tools/url-removal

  • Popup tylko raz na sesję jquery sessionstorage
    
    
    //ukrycie popup jeżeli nie jest to 1 sesja
    	$(document).ready(function() {
        $(function(){
          if (!sessionStorage.isVisited) {
      sessionStorage.isVisited = 'true'
          $('#popup1').css("visibility", "visible"); 
           $('#popup1').css("opacity", 1); 
          }
    	  else {
    	   $('#popup1').css("visibility", "hidden"); 
           $('#popup1').css("opacity", 0);}
           });
      // zamknięcie popup po kliknięciu close
      $( ".close" ).click(function() {
      
           $('#popup1').css("visibility", "hidden"); 
           $('#popup1').css("opacity", 0);
        });
    });
    
    
    
  • Skuteczny landingpage

    The best way to do that is by writing very short paragraphs, removing the distractions (ads, navigation, etc.) and stating the purpose right in the beginning. Keep their need, interests, and problems in mind and present a solution right away.

  • Jquery dodanie nowego elementu do listy

    Jquery dodanie elementu listy li

    Dodanie li child do menu:
    po ID:

    $("#topMenu ul").append('<li><a href="https://b2b.stylauto.pl">B2B</a></li>');
    

    po class

    $('.navbar-collapse ul').append('<li><a href="https://b2b.stylauto.pl">B2B</a></li>');
    $('.navbar-nav ul').prepend('<li><a href="https://b2b.stylauto.pl">B2B</a></li>');
    

    po id – działa ale nie dodaje elementu do dziecka – dziecka:

    $('#topMenu>ul').append('<li><a href="https://b2b.stylauto.pl">B2B</a></li>');
    

     

     

  • Frontend przykładowe wymagania

    👾 knowledge of HTML5 and CSS3, CSS preprocessors – SASS and W3C standards,
    👾 knowledge of Vue.js / React libraries (as we are VueStrefront Core Partner),
    👾 experience in cross-browser testing and familiarity with caniuse,
    👾 knowledge of CSS methodologies such as BEM or OOCSS

  • Javascript/jquery dodanie css – różne opcje
    Dodanie css przez jquery
    
    
        $('body').css('background-image','url(\"https://static.pl/wideo_tlo_s.png\")');
    	$('body').css('background-position','bottom');
    	$('body').css('background-repeat','no-repeat');
    
    document.body.style.background = "url('https://static.pl/wideo_tlo_s.png')";
    document.body.style.backgroundPosition = "center bottom";
    document.body.style.backgroundRepeat = "no-repeat";
    
    \\body {
    		  \\background:url("https://static.pl/wideo_tlo_s.png");
    		  \\background-position: bottom; background-repeat: no-repeat}
    
        document.body.style.background = "url('https://static.abstore.pl/design/accounts/stylauto/img/bazowy/wideo_tlo_s.png') no-repeat bottom";
    

    Lub przez dodanie klasy a jej zdefiniowanie w css

    $('body').addClass('videobg'); 
    
    .videobg {
    		  background-image:url("https://static.abstore.pl/design/accounts/stylauto/img/bazowy/wideo_tlo_s.png");
    		  background-position:bottom;
    		  background-repeat:no-repeat;
    		  height:auto;}
    			>
    

     

     

  • Własne tłumaczenie jakiegoś wyrażenia w woocommerce

    Funkcja do functions.php umożliwiająca własne tłumaczenia pól odporne na aktualizacje woocommerce.
    Sprawdzi się w sklepie z 1 językiem

    // Zmiana tłumaczenia "Adres rozliczeniowy" na "Adres na fakturę"
    add_filter('gettext', 'translate_reply');
    add_filter('ngettext', 'translate_reply');
    function translate_reply($translated) {
    $translated = str_ireplace('Adres rozliczeniowy', 'Adres na fakturę', $translated);
    return $translated;
    }
    

    Funkcję można ograniczyć tylko do strony koszyka korzystając no z:

    if (is_cart()) {
    // run function
    }
    

     

  • Google Analytics: Alert o wzroście odwiedzin stron 404

    Cel:  najlepiej odwiedziny strony z określonym tytułem (zawierające 404)

    + Alert: wzrost współczynnnika realizacji powyższego celu

     

date_format
Specify the date format used when include_date is true. See Formatting Date and Time on the Codex for more information.
Default: ‚(n/j/Y)’
Example:

date
Specify a date to query for posts published that date. More info on Date Queries
Default: empty
Example:

date_column
Specify which date column to use for all date queries. More info on Date Queries
Default: post_date
Example:

date_compare
Specify the comparison operator used for all date queries. More info on Date Queries
Default: =
Example:

date_query_before
Specify the before argument for a date query. More info on Date Queries
Default: empty
Example:

date_query_after
Specify the after argument for a date query. More info on Date Queries
Default: empty
Example:

date_query_column
Specify the date column used for this query. More info on Date Queries
Default: post_date
Example:

date_query_compare
Specify the comparison operator used for this query. More info on Date Queries
Default: =
Example:

excerpt_length
Specify the number of words used in an excerpt. More information
Default: empty (set by your theme)
Example:

excerpt_more
Specify the more text that appears after the excerpt.
Default: empty (set by your theme)
Example:

excerpt_more_link
Specify whether or not to link the excerpt_more text to the post
Default: false
Example:

exclude_current
Specify whether or not to exclude the current post from the query
Default: false
Example:

id
Specify a specific post ID (or multiple post IDs) to display.
Default: empty
Example:

ignore_sticky_posts
Specify whether or not to ignore sticky posts
Default: false
Example: [displa-posts ignore_sticky_posts=”true”]

image_size
Specify an image size for displaying the featured image, if the post has one. The image_size can be set to thumbnail, medium, large (all controlled from Settings > Media), or a custom image size. See Image Alignment
Default: empty
Example:

include_author
Specify whether or not to include the post’s author name.
Default: false Example:

include_content
Specify whether or not to include the full post content. Note that

will be stripped out of the content to prevent infinite loops
Default: false
Example:
  • Śledzenie kliknięć w numer telefonu GA

    Z pomocą Google Tag managera: https://www.optimizesmart.com/event-tracking-in-google-tag-manager-v2-complete-guide/

    Z pomocą Google Analytics: https://digitalshiftmedia.com/google-analytics-event-tracking/

  • Informacja o cookies -z CDN

    Dodać w footer.php przed zamknięciem znacznika body:

    dd
    https://cdn.rawgit.com/designvkp/CookieInfoScript/68f31f13/cookieinfo.min.js
    
  • usuwanie url z indeksu przez google search console

    https://www.google.com/webmasters/tools/url-removal

  • Popup tylko raz na sesję jquery sessionstorage
    
    
    //ukrycie popup jeżeli nie jest to 1 sesja
    	$(document).ready(function() {
        $(function(){
          if (!sessionStorage.isVisited) {
      sessionStorage.isVisited = 'true'
          $('#popup1').css("visibility", "visible"); 
           $('#popup1').css("opacity", 1); 
          }
    	  else {
    	   $('#popup1').css("visibility", "hidden"); 
           $('#popup1').css("opacity", 0);}
           });
      // zamknięcie popup po kliknięciu close
      $( ".close" ).click(function() {
      
           $('#popup1').css("visibility", "hidden"); 
           $('#popup1').css("opacity", 0);
        });
    });
    
    
    
  • Skuteczny landingpage

    The best way to do that is by writing very short paragraphs, removing the distractions (ads, navigation, etc.) and stating the purpose right in the beginning. Keep their need, interests, and problems in mind and present a solution right away.

  • Jquery dodanie nowego elementu do listy

    Jquery dodanie elementu listy li

    Dodanie li child do menu:
    po ID:

    $("#topMenu ul").append('<li><a href="https://b2b.stylauto.pl">B2B</a></li>');
    

    po class

    $('.navbar-collapse ul').append('<li><a href="https://b2b.stylauto.pl">B2B</a></li>');
    $('.navbar-nav ul').prepend('<li><a href="https://b2b.stylauto.pl">B2B</a></li>');
    

    po id – działa ale nie dodaje elementu do dziecka – dziecka:

    $('#topMenu>ul').append('<li><a href="https://b2b.stylauto.pl">B2B</a></li>');
    

     

     

  • Frontend przykładowe wymagania

    👾 knowledge of HTML5 and CSS3, CSS preprocessors – SASS and W3C standards,
    👾 knowledge of Vue.js / React libraries (as we are VueStrefront Core Partner),
    👾 experience in cross-browser testing and familiarity with caniuse,
    👾 knowledge of CSS methodologies such as BEM or OOCSS

  • Javascript/jquery dodanie css – różne opcje
    Dodanie css przez jquery
    
    
        $('body').css('background-image','url(\"https://static.pl/wideo_tlo_s.png\")');
    	$('body').css('background-position','bottom');
    	$('body').css('background-repeat','no-repeat');
    
    document.body.style.background = "url('https://static.pl/wideo_tlo_s.png')";
    document.body.style.backgroundPosition = "center bottom";
    document.body.style.backgroundRepeat = "no-repeat";
    
    \\body {
    		  \\background:url("https://static.pl/wideo_tlo_s.png");
    		  \\background-position: bottom; background-repeat: no-repeat}
    
        document.body.style.background = "url('https://static.abstore.pl/design/accounts/stylauto/img/bazowy/wideo_tlo_s.png') no-repeat bottom";
    

    Lub przez dodanie klasy a jej zdefiniowanie w css

    $('body').addClass('videobg'); 
    
    .videobg {
    		  background-image:url("https://static.abstore.pl/design/accounts/stylauto/img/bazowy/wideo_tlo_s.png");
    		  background-position:bottom;
    		  background-repeat:no-repeat;
    		  height:auto;}
    			>
    

     

     

  • Własne tłumaczenie jakiegoś wyrażenia w woocommerce

    Funkcja do functions.php umożliwiająca własne tłumaczenia pól odporne na aktualizacje woocommerce.
    Sprawdzi się w sklepie z 1 językiem

    // Zmiana tłumaczenia "Adres rozliczeniowy" na "Adres na fakturę"
    add_filter('gettext', 'translate_reply');
    add_filter('ngettext', 'translate_reply');
    function translate_reply($translated) {
    $translated = str_ireplace('Adres rozliczeniowy', 'Adres na fakturę', $translated);
    return $translated;
    }
    

    Funkcję można ograniczyć tylko do strony koszyka korzystając no z:

    if (is_cart()) {
    // run function
    }
    

     

  • Google Analytics: Alert o wzroście odwiedzin stron 404

    Cel:  najlepiej odwiedziny strony z określonym tytułem (zawierające 404)

    + Alert: wzrost współczynnnika realizacji powyższego celu

     

include_date
Include the post’s date after the post title. The default format is (7/30/12), but this can be customized using the ‚date_format’ parameter.
Default: empty
Example

include_excerpt
Include the post’s excerpt after the title (and date if provided).
Default: empty
Example:

include_title
Include the post’s title
Default: true
Example:

meta_key
Specify a meta key, for meta queries or ordering
Default: empty
Example:

meta_value
Specify a meta value, for meta queries
Default: empty
Example:

no_posts_message
Specify a message to display if no posts are found
Default: empty
Example:

Sorry, no items are currently on sale

offset
The number of posts to pass over
Default: 0
Example:

order
Specify whether posts are ordered in descending order (DESC) or ascending order (ASC).
Default: DESC
Example:

orderby
Specify what the posts are ordered by. See the available parameters here.
Default: date
Example:

post_parent
Display the pages that are a child of a certain page. You can either specify an ID or ‚current’, which displays the children of the current page.
Default: empty
Example:

post_status
Show posts associated with a certain post status
Default: publish
Example:

post_type
Specify which post type to use. You can use a default one (post or page), or a custom post type you’ve created.
Default: post
Example:

posts_per_page
How many posts to display.
Default: 10
Example:

tag
Display posts from a specific tag, or tags. You must use the tag slug(ex: example-tag), not the tag’s name (ex: Example Tag).
Default: empty
Example:

taxonomy, tax_term, and tax_operator
Use these parameters to do advanced taxonomy queries. Use ‚taxonomy’ for the taxonomy you’d like to query, ‚tax_term’ for the term slug (or terms) you’d like to include, and ‚operator’ to change how the query uses those terms (most likely this field will not be needed). See Multiple Taxonomy Queries
Default: ‚taxonomy’ = empty , ‚tax_term’ = empty , ‚tax_operator’ = ‚IN’
Example:

time
Specify the time, to be used in a date query. More info on Date Queries
Default: empty
Example:

title
Give the list of posts a title heading
Default: empty
Example:

wrapper
What type of HTML should be used to display the listings. It can be an unordered list (ul), ordered list (ol), or divs (div) which you can then style yourself.
Default: ul
Example:

  1. Śledzenie kliknięć w numer telefonu GA
  2. Informacja o cookies -z CDN
  3. usuwanie url z indeksu przez google search console
  4. Popup tylko raz na sesję jquery sessionstorage
  5. Skuteczny landingpage
  6. Jquery dodanie nowego elementu do listy
  7. Frontend przykładowe wymagania
  8. Javascript/jquery dodanie css – różne opcje
  9. Własne tłumaczenie jakiegoś wyrażenia w woocommerce
  10. Google Analytics: Alert o wzroście odwiedzin stron 404

wrapper_class
Class applied to the wrapper tag for custom css formatting for this instance.
Default: display-posts-listing
Example:

wrapper_id
Specify an unique ID to be used on the wrapper of this listing
Default: empty
Example:

Skomentuj

Wprowadź swoje dane lub kliknij jedną z tych ikon, aby się zalogować:

Logo WordPress.com

Komentujesz korzystając z konta WordPress.com. Wyloguj /  Zmień )

Zdjęcie na Google

Komentujesz korzystając z konta Google. Wyloguj /  Zmień )

Zdjęcie z Twittera

Komentujesz korzystając z konta Twitter. Wyloguj /  Zmień )

Zdjęcie na Facebooku

Komentujesz korzystając z konta Facebook. Wyloguj /  Zmień )

Połączenie z %s