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:

  • Infekcje pharma, viagra w wordpressie

    https://blog.sucuri.net/2016/09/cleaning-the-wp-page-pharma-hack-in-wordpress.html

    Cleaning the Wp-Page Pharma Hack in WordPress

    Pharma hacks are common website infections categorized under SEO spam. With pharma hacks, the attacker exploits vulnerable websites to distribute pharmaceutical content to search engines and the sites visitors. Symptoms of a pharma hack include embedded links and anchor text on pages or modified listings in Search Engine Results Pages (SERPs). These attacks most often target search engines like Google or Bing in an attempt to increase traffic to illegal pharmaceutical businesses.

    Finding a site littered with pharma links gets interesting once you dive into the details, tactics, and techniques employed by the attacker. Sometimes a simple cleanup reveals a more extensive strategy by the hacker. Recently, during a routine website infection cleanup for one of our clients, we came across a pharma hack that was dirtying their SEO by targeting the Google SERPs.

    The Undeletable Pharma Doorway

    In this specific case (originally disclosed by Denis Sinegubko on the Sucuri Labs – The Undeletable Pharma ‘Doorway’), identifying the root of the problem was simple. We traced the infection to a specific file: wp-page.php. It injected a pharma spam redirect page (i.e., doorway) at the root of the site for users coming from search engines.

    The payload of this pharma hack produced similar results to this Google SERP screenshot:

    pharma hack Google results for wp-page and viagra
    This image was taken from a Google search for ‘viagra’ and ‘wp-page’ (not our client’s site).

    The course of action was simple – remove the file by deleting it via terminal or an FTP client. To our surprise, when we tried to verify that injection was removed, it was still there. The spam content continued to show up in the SERPs.

    Our first thought was to make sure that the page was not cached.  If it was, we would understand why the spam was still displaying in Google results. When the headers stated that it was not a cached page, we checked the file on the server. Indeed, the file we removed was back with a new modification date. What happened?

    We deleted the file again. A few seconds later the file was recreated. This behavior is typical with malware that uses cronjobs to reinfect sites, so we decided to check the user’s crontab. Nothing suspicious was found in the cronjobs. Then our focus immediately shifted to looking for some kind of backdoor.

    Identifying the Regenerating Script

    After an exhaustive review, we found the culprit.

    It came down to a file named nav.php that was embedded in the active theme directory of the site. The first clue was that the file content was adding wp-page.php to legitimate site pages whenever a request was made by Googlebot or Bingbot.

    Here’s what we saw:

    pharma hack doorway regenerating wp-page.php
    Adding wp-page.php based on Googlebot and Bingbot user-agents

    Appending wp-page.php to legitimate requests wasn’t the real problem; it was the actual regeneration of the file. We found this same file not only appended wp-page.php to the requests, but was responsible for recreating the file (whether it existed or not).

    Ok, now we were getting closer! We just needed to figure out what executes that nav.php file.

    The answer was inside the header.php file of the active theme:Sucuri-UndeletableDoorway-2

    For those unfamiliar with how themes work, the attacker added an include in the header file that loaded the nav.php file every time the theme was loaded by visitors.

    Now we can see why the malicious content continued to appear. The hacker injected this line into header.php to make the malicious code execute every time a public website page was requested. This is mainly done to send the spam to search engine crawlers, but it also recreates the wp-page.php as a “delete protection” feature. After we removed the nav.php and the include in the header.php, we were relieved to see that the spam was gone from the SERP.

    There is More to Cleaning Than Deleting Files

    This case perfectly demonstrates that a site cleanup is not finished once the malicious files are located and removed. After the initial cleanup, you should always confirm that the malware is gone completely and continue monitoring the site. If you don’t, you may allow hackers to reinfect your site via a backdoor or unpatched security hole. Reinfection may happen within seconds (as seen here) or it may take days before the malware returns, causing another stressful issue.

    In this specific case, monitoring the integrity of core files and theme files would have paid huge dividends to the site owner. For those using WordPress, this can be achieved through the use of our free WordPress security plugin.

    Additionally, we suggest always completing the following post-hack steps after any compromise.

    Lastly, if you find yourself in a position where you feel attackers are injecting spam in your web pages or SERPs, know that we’re here to help.

  • regulamin konkursu jak stworzyć

    źródło: http://czaplicka.eu/regulamin-konkurs-facebook/

     

    Regulamin konkursu na Facebooku – co się powinno w nim znaleźć?

    Postanowienia ogólne

    • kto: organizator oraz koordynator (jeśli np. w Twoim imieniu robi to agencja)
    • gdzie: kraj
    • po co: cel konkursu
    • za co: kto płaci za nagrody
    • kiedy: harmonogram
    • jak: na podstawie regulaminu lub innego dokumentu określającego zasady zabawy

    Zasady i przebieg konkursu oraz wyłaniania zwycięzców

    • kto może być uczestnikiem (np. osoby pełnoletnie, które polubią fanpage itd.)
    • wykluczenie (np. członkowie rodzin organizatorów itd.)
    • ile zgłoszeń można przesłać, czy można zwiększyć swoje szanse w jakiś sposób
    • co trzeba zrobić
    • czego nie można robić – zaznacz jak można zostać zdyskwalifikowanym
    • kto wygrywa
    • jak osoby, które wygrały dowiedzą się o wygranej
    • w jaki sposób otrzymają nagrody i jakie warunki muszą spełnić, żeby je otrzymać

    Nagrody

    • lista nagród oraz ich wartość z przypisaniem do konkretnego miejsca (np. dla osoby, która wygra nagroda x, dla drugiego miejsca nagroda y…)
    • brak możliwości wymiany nagrody na równowartość pieniężną
    • brak możliwości przenoszenia nagrody na kogoś innego
    • zapis, że uczestnik konkursu odpowiada za dostarczenie stosownych danych (np. adres do wysyłki)

    Reklamacje

    • harmonogram (do kiedy można zgłaszać)
    • jak można zgłaszać
    • dokąd kierować reklamacje
    • co powinno być w reklamacji
    • inne ważne informacje

    Postanowienia końcowe

    • obowiązek akceptacji regulaminu, jeśli uczestnik chce wziąć udział w zabawie
    • kwestia praw autorskich i naruszania innych praw
    • w kwestiach nieuregulowanych tym regulaminem zastosowanie mają przepisy Kodeksu Cywilnego

    Regulamin konkursu na Facebooku jest niezmiernie ważny! Staraj się pisać tak, żeby przeciętna osoba była go w stanie zrozumieć (unikaj żargonu prawniczego i zbyt dużo odniesień technicznych).

  • wordpress zawiesił się w maintenance mode

    Wejść na serwer i usunąć plik .maintenance

  • Jak wykonać 2 kolumny w menu wordpress?

    źródło: http://www.prowebdesign.ro/wordpress-sub-menu-items-split-in-2-columns-the-easy-way/

    WordPress sub-menu items split in 2 columns. The easy way.

    Let’s say you have a long list of items in one of your WordPress sub-menu drop downs. It is often the case with Products or Services sections of the site. So, you probably want those sub-menu items to be split in 2 columns. But you want 2 columns only in certain sub-menus, and you don’t want to overly complicate things with a mega-menu WP plugin. Well, there is an easy way to achieve this using flexibility and power of WP menus, and CSS :nth-child() selector.

    This is what we will be making:

    2columns-subsYour menu may look different from the picture, it doesn’t matter. What we are looking for are the two columns of sub-items in the drop down. The solution fits for any theme design. What you should have, though, is the WP Navigation Menu, created by you in Appearance -> Menus. Not an auto-generated list of pages. This is the only must.

    Say, you have your main menu in place, and you have some 12 sub-items for the Products menu item. Here’s how you split them in 2 columns in your sub-menu:

    2columns-menu1. Go to Appearance -> Menus and select the menu you want to edit.

    2. Type sub-menu-columns in the top menu item CSS Classes (optional) field. In our case – it’s the Products. See image for help.
    If you don’t see CSS Classes (optional) field in the menu item box, then click Screen Options at the top right corner of the screen and check CSS Classes checkbox.

    3. Click SAVE MENU button.

    4. WordPress assigns class sub-menu to the ul that holds sub-item li-s. In your CSS find (or add) .sub-menu selector and add this line to declaration: width: 410px;. You can set width to anything you want, actually.

    5. Then add this block of CSS to your stylesheet:

    01
    02
    03
    04
    05
    06
    07
    08
    09
    10
    11
    12
    .sub-menu-columns ul.sub-menu li {
        display: inline-block;
        float: left;
        width: 200px;
    }
    .sub-menu-columns ul.sub-menu li:nth-child(odd) {
        float: left;
        margin-right: 10px;
    }
    .sub-menu-columns ul.sub-menu li:nth-child(even) {
        float: right;
    }

    You may want to tweak the widths, of course, or add some fancy styling. But the general idea is that simple: float odd children left, float even children right, give them widths so they don’t stray. Remember to set width of the sub-menu ul to the sum of li widths plus margin.

  • wordpress: jak automatycznie wyświetlić child item w menu?

    Znalezione na: https://wordpress.stackexchange.com/questions/100841/add-child-pages-automatically-to-nav-menu

    here is how:

    /**
    * auto_child_page_menu
    * 
    * class to add top level page menu items all child pages on the fly
    * @author Ohad Raz <admin@bainternet.info>
    */
    class auto_child_page_menu
    {
        /**
         * class constructor
         * @author Ohad Raz <admin@bainternet.info>
         * @param   array $args 
         * @return  void
         */
        function __construct($args = array()){
            add_filter('wp_nav_menu_objects',array($this,'on_the_fly'));
        }
        /**
         * the magic function that adds the child pages
         * @author Ohad Raz <admin@bainternet.info>
         * @param  array $items 
         * @return array 
         */
        function on_the_fly($items) {
            global $post;
            $tmp = array();
            foreach ($items as $key => $i) {
                $tmp[] = $i;
                //if not page move on
                if ($i->object != 'page'){
                    continue;
                }
                $page = get_post($i->object_id);
                //if not parent page move on
                if (!isset($page->post_parent) || $page->post_parent != 0) {
                    continue;
                }
                $children = get_pages( array('child_of' => $i->object_id) );
                foreach ((array)$children as $c) {
                    //set parent menu
                    $c->menu_item_parent      = $i->ID;
                    $c->object_id             = $c->ID;
                    $c->object                = 'page';
                    $c->type                  = 'post_type';
                    $c->type_label            = 'Page';
                    $c->url                   = get_permalink( $c->ID);
                    $c->title                 = $c->post_title;
                    $c->target                = '';
                    $c->attr_title            = '';
                    $c->description           = '';
                    $c->classes               = array('','menu-item','menu-item-type-post_type','menu-item-object-page');
                    $c->xfn                   = '';
                    $c->current               = ($post->ID == $c->ID)? true: false;
                    $c->current_item_ancestor = ($post->ID == $c->post_parent)? true: false; //probbably not right
                    $c->current_item_parent   = ($post->ID == $c->post_parent)? true: false;
                    $tmp[] = $c;
                }
            }
            return $tmp;
        }
    }
    new auto_child_page_menu();
    shareimprove this answer
  • Dodanie shortkodu kodem php, wordpress
    echo do_shortcode( '[aws_search_form]' );
  • 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:

    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:

    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:

    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:

    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:

  • zwiększanie wydajności wordpressa – ograniczanie treści PLUGIN WP-OPTIMIZE , image cleanup plugin
    1. Usuwanie starych postów, draftów postów i nieużywanych tabel w bazie danych:

    PLUGIN WP-OPTIMIZE

    2. Usuwanie nieużywanych mediów

    image cleanup plugin – kiepskie recenzje!! UWAGA

    3. Usunięcie niedziałających linków:

    Clean Up Broken Links

    4. Optymalizacja bazy danych:

    Clean Up Database

    Ad 1)

    PLUGIN WP-OPTIMIZE. Żródło: https://woorkup.com/delete-old-wordpress-revisions-db/

    How to Delete Old WordPress Revisions from your DB

    Delete Old WordPress Revisions

    In a previous post I wrote about how to how to disable and limit WordPress post revisions. In this post I will show you how to delete your old WordPress revisions and clean up/optimize your database. This ensures that your site keeps running at optimal performance. Neil Patel has a great infographic about how load time affects Google rankings.

    Step 1

    First we are going to grab the free WordPress plugin WP-Optimize, developed by Ruhani Rabin. As of writing this the plugin has over 500,000+ active installs with a 4.8 out of 5 star rating.

    wp-optimize plugin

    Be careful when searching for plugins that delete post/page revisions. Some of these plugins can cause a lot of damage. I have personally used this one on a lot of sites and can vouch for it and the developers. I have never had any problems with it. But as always I recommend backing up your database before running this plugin. (I personally use VaultPress so I never have to worry; on top of my host’s backups)

    Step 2

    Once you have installed it click into WP-Optimize on your sidebar within your WordPress dashboard.

    wp optimize delete WordPress revisions

    Step 3

    You now have a couple options. The most important ones here are “clean up post revisions” and also I recommend checking “optimize database tables.” You can also check the additional ones to clean up auto drafts, spam comments, etc. I personally always run the 5 options as shown below. When you are ready, click on “Process.”

    clean up post revisions

    You will then see a confirmation of the everything that has been deleted, such as post revisions, auto drafts, etc.

    confirmation of post revisions deleted

    And that’s it, your done! You can remove the plugin if you want. I usually install it to cleanup my WordPress revisions and then uninstall.

    I have seen dramatic speed increases by doing this on client’s sites that haven’t limited the number of revisions in WordPress. Some of them cleaning up more than 1,500+ revisions.

    As always feel free to comment below!

  • Usunięcie opinii z woocommerce w functions.php

    /*usunięcie opinii*/
    add_filter( ‚woocommerce_product_tabs’, ‚wcs_woo_remove_reviews_tab’, 98 );
    function wcs_woo_remove_reviews_tab($tabs) {
    unset($tabs[‚reviews’]);
    return $tabs;
    }

  • Usunięcie komentarzy do wordpressa przez functions.php

    https://dfactory.eu/turn-off-disable-comments/

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:
  • Infekcje pharma, viagra w wordpressie

    https://blog.sucuri.net/2016/09/cleaning-the-wp-page-pharma-hack-in-wordpress.html

    Cleaning the Wp-Page Pharma Hack in WordPress

    Pharma hacks are common website infections categorized under SEO spam. With pharma hacks, the attacker exploits vulnerable websites to distribute pharmaceutical content to search engines and the sites visitors. Symptoms of a pharma hack include embedded links and anchor text on pages or modified listings in Search Engine Results Pages (SERPs). These attacks most often target search engines like Google or Bing in an attempt to increase traffic to illegal pharmaceutical businesses.

    Finding a site littered with pharma links gets interesting once you dive into the details, tactics, and techniques employed by the attacker. Sometimes a simple cleanup reveals a more extensive strategy by the hacker. Recently, during a routine website infection cleanup for one of our clients, we came across a pharma hack that was dirtying their SEO by targeting the Google SERPs.

    The Undeletable Pharma Doorway

    In this specific case (originally disclosed by Denis Sinegubko on the Sucuri Labs – The Undeletable Pharma ‘Doorway’), identifying the root of the problem was simple. We traced the infection to a specific file: wp-page.php. It injected a pharma spam redirect page (i.e., doorway) at the root of the site for users coming from search engines.

    The payload of this pharma hack produced similar results to this Google SERP screenshot:

    pharma hack Google results for wp-page and viagra
    This image was taken from a Google search for ‘viagra’ and ‘wp-page’ (not our client’s site).

    The course of action was simple – remove the file by deleting it via terminal or an FTP client. To our surprise, when we tried to verify that injection was removed, it was still there. The spam content continued to show up in the SERPs.

    Our first thought was to make sure that the page was not cached.  If it was, we would understand why the spam was still displaying in Google results. When the headers stated that it was not a cached page, we checked the file on the server. Indeed, the file we removed was back with a new modification date. What happened?

    We deleted the file again. A few seconds later the file was recreated. This behavior is typical with malware that uses cronjobs to reinfect sites, so we decided to check the user’s crontab. Nothing suspicious was found in the cronjobs. Then our focus immediately shifted to looking for some kind of backdoor.

    Identifying the Regenerating Script

    After an exhaustive review, we found the culprit.

    It came down to a file named nav.php that was embedded in the active theme directory of the site. The first clue was that the file content was adding wp-page.php to legitimate site pages whenever a request was made by Googlebot or Bingbot.

    Here’s what we saw:

    pharma hack doorway regenerating wp-page.php
    Adding wp-page.php based on Googlebot and Bingbot user-agents

    Appending wp-page.php to legitimate requests wasn’t the real problem; it was the actual regeneration of the file. We found this same file not only appended wp-page.php to the requests, but was responsible for recreating the file (whether it existed or not).

    Ok, now we were getting closer! We just needed to figure out what executes that nav.php file.

    The answer was inside the header.php file of the active theme:Sucuri-UndeletableDoorway-2

    For those unfamiliar with how themes work, the attacker added an include in the header file that loaded the nav.php file every time the theme was loaded by visitors.

    Now we can see why the malicious content continued to appear. The hacker injected this line into header.php to make the malicious code execute every time a public website page was requested. This is mainly done to send the spam to search engine crawlers, but it also recreates the wp-page.php as a “delete protection” feature. After we removed the nav.php and the include in the header.php, we were relieved to see that the spam was gone from the SERP.

    There is More to Cleaning Than Deleting Files

    This case perfectly demonstrates that a site cleanup is not finished once the malicious files are located and removed. After the initial cleanup, you should always confirm that the malware is gone completely and continue monitoring the site. If you don’t, you may allow hackers to reinfect your site via a backdoor or unpatched security hole. Reinfection may happen within seconds (as seen here) or it may take days before the malware returns, causing another stressful issue.

    In this specific case, monitoring the integrity of core files and theme files would have paid huge dividends to the site owner. For those using WordPress, this can be achieved through the use of our free WordPress security plugin.

    Additionally, we suggest always completing the following post-hack steps after any compromise.

    Lastly, if you find yourself in a position where you feel attackers are injecting spam in your web pages or SERPs, know that we’re here to help.

  • regulamin konkursu jak stworzyć

    źródło: http://czaplicka.eu/regulamin-konkurs-facebook/

     

    Regulamin konkursu na Facebooku – co się powinno w nim znaleźć?

    Postanowienia ogólne

    • kto: organizator oraz koordynator (jeśli np. w Twoim imieniu robi to agencja)
    • gdzie: kraj
    • po co: cel konkursu
    • za co: kto płaci za nagrody
    • kiedy: harmonogram
    • jak: na podstawie regulaminu lub innego dokumentu określającego zasady zabawy

    Zasady i przebieg konkursu oraz wyłaniania zwycięzców

    • kto może być uczestnikiem (np. osoby pełnoletnie, które polubią fanpage itd.)
    • wykluczenie (np. członkowie rodzin organizatorów itd.)
    • ile zgłoszeń można przesłać, czy można zwiększyć swoje szanse w jakiś sposób
    • co trzeba zrobić
    • czego nie można robić – zaznacz jak można zostać zdyskwalifikowanym
    • kto wygrywa
    • jak osoby, które wygrały dowiedzą się o wygranej
    • w jaki sposób otrzymają nagrody i jakie warunki muszą spełnić, żeby je otrzymać

    Nagrody

    • lista nagród oraz ich wartość z przypisaniem do konkretnego miejsca (np. dla osoby, która wygra nagroda x, dla drugiego miejsca nagroda y…)
    • brak możliwości wymiany nagrody na równowartość pieniężną
    • brak możliwości przenoszenia nagrody na kogoś innego
    • zapis, że uczestnik konkursu odpowiada za dostarczenie stosownych danych (np. adres do wysyłki)

    Reklamacje

    • harmonogram (do kiedy można zgłaszać)
    • jak można zgłaszać
    • dokąd kierować reklamacje
    • co powinno być w reklamacji
    • inne ważne informacje

    Postanowienia końcowe

    • obowiązek akceptacji regulaminu, jeśli uczestnik chce wziąć udział w zabawie
    • kwestia praw autorskich i naruszania innych praw
    • w kwestiach nieuregulowanych tym regulaminem zastosowanie mają przepisy Kodeksu Cywilnego

    Regulamin konkursu na Facebooku jest niezmiernie ważny! Staraj się pisać tak, żeby przeciętna osoba była go w stanie zrozumieć (unikaj żargonu prawniczego i zbyt dużo odniesień technicznych).

  • wordpress zawiesił się w maintenance mode

    Wejść na serwer i usunąć plik .maintenance

  • Jak wykonać 2 kolumny w menu wordpress?

    źródło: http://www.prowebdesign.ro/wordpress-sub-menu-items-split-in-2-columns-the-easy-way/

    WordPress sub-menu items split in 2 columns. The easy way.

    Let’s say you have a long list of items in one of your WordPress sub-menu drop downs. It is often the case with Products or Services sections of the site. So, you probably want those sub-menu items to be split in 2 columns. But you want 2 columns only in certain sub-menus, and you don’t want to overly complicate things with a mega-menu WP plugin. Well, there is an easy way to achieve this using flexibility and power of WP menus, and CSS :nth-child() selector.

    This is what we will be making:

    2columns-subsYour menu may look different from the picture, it doesn’t matter. What we are looking for are the two columns of sub-items in the drop down. The solution fits for any theme design. What you should have, though, is the WP Navigation Menu, created by you in Appearance -> Menus. Not an auto-generated list of pages. This is the only must.

    Say, you have your main menu in place, and you have some 12 sub-items for the Products menu item. Here’s how you split them in 2 columns in your sub-menu:

    2columns-menu1. Go to Appearance -> Menus and select the menu you want to edit.

    2. Type sub-menu-columns in the top menu item CSS Classes (optional) field. In our case – it’s the Products. See image for help.
    If you don’t see CSS Classes (optional) field in the menu item box, then click Screen Options at the top right corner of the screen and check CSS Classes checkbox.

    3. Click SAVE MENU button.

    4. WordPress assigns class sub-menu to the ul that holds sub-item li-s. In your CSS find (or add) .sub-menu selector and add this line to declaration: width: 410px;. You can set width to anything you want, actually.

    5. Then add this block of CSS to your stylesheet:

    01
    02
    03
    04
    05
    06
    07
    08
    09
    10
    11
    12
    .sub-menu-columns ul.sub-menu li {
        display: inline-block;
        float: left;
        width: 200px;
    }
    .sub-menu-columns ul.sub-menu li:nth-child(odd) {
        float: left;
        margin-right: 10px;
    }
    .sub-menu-columns ul.sub-menu li:nth-child(even) {
        float: right;
    }

    You may want to tweak the widths, of course, or add some fancy styling. But the general idea is that simple: float odd children left, float even children right, give them widths so they don’t stray. Remember to set width of the sub-menu ul to the sum of li widths plus margin.

  • wordpress: jak automatycznie wyświetlić child item w menu?

    Znalezione na: https://wordpress.stackexchange.com/questions/100841/add-child-pages-automatically-to-nav-menu

    here is how:

    /**
    * auto_child_page_menu
    * 
    * class to add top level page menu items all child pages on the fly
    * @author Ohad Raz <admin@bainternet.info>
    */
    class auto_child_page_menu
    {
        /**
         * class constructor
         * @author Ohad Raz <admin@bainternet.info>
         * @param   array $args 
         * @return  void
         */
        function __construct($args = array()){
            add_filter('wp_nav_menu_objects',array($this,'on_the_fly'));
        }
        /**
         * the magic function that adds the child pages
         * @author Ohad Raz <admin@bainternet.info>
         * @param  array $items 
         * @return array 
         */
        function on_the_fly($items) {
            global $post;
            $tmp = array();
            foreach ($items as $key => $i) {
                $tmp[] = $i;
                //if not page move on
                if ($i->object != 'page'){
                    continue;
                }
                $page = get_post($i->object_id);
                //if not parent page move on
                if (!isset($page->post_parent) || $page->post_parent != 0) {
                    continue;
                }
                $children = get_pages( array('child_of' => $i->object_id) );
                foreach ((array)$children as $c) {
                    //set parent menu
                    $c->menu_item_parent      = $i->ID;
                    $c->object_id             = $c->ID;
                    $c->object                = 'page';
                    $c->type                  = 'post_type';
                    $c->type_label            = 'Page';
                    $c->url                   = get_permalink( $c->ID);
                    $c->title                 = $c->post_title;
                    $c->target                = '';
                    $c->attr_title            = '';
                    $c->description           = '';
                    $c->classes               = array('','menu-item','menu-item-type-post_type','menu-item-object-page');
                    $c->xfn                   = '';
                    $c->current               = ($post->ID == $c->ID)? true: false;
                    $c->current_item_ancestor = ($post->ID == $c->post_parent)? true: false; //probbably not right
                    $c->current_item_parent   = ($post->ID == $c->post_parent)? true: false;
                    $tmp[] = $c;
                }
            }
            return $tmp;
        }
    }
    new auto_child_page_menu();
    shareimprove this answer
  • Dodanie shortkodu kodem php, wordpress
    echo do_shortcode( '[aws_search_form]' );
  • 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:

    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:

    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:

    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:

    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:

  • zwiększanie wydajności wordpressa – ograniczanie treści PLUGIN WP-OPTIMIZE , image cleanup plugin
    1. Usuwanie starych postów, draftów postów i nieużywanych tabel w bazie danych:

    PLUGIN WP-OPTIMIZE

    2. Usuwanie nieużywanych mediów

    image cleanup plugin – kiepskie recenzje!! UWAGA

    3. Usunięcie niedziałających linków:

    Clean Up Broken Links

    4. Optymalizacja bazy danych:

    Clean Up Database

    Ad 1)

    PLUGIN WP-OPTIMIZE. Żródło: https://woorkup.com/delete-old-wordpress-revisions-db/

    How to Delete Old WordPress Revisions from your DB

    Delete Old WordPress Revisions

    In a previous post I wrote about how to how to disable and limit WordPress post revisions. In this post I will show you how to delete your old WordPress revisions and clean up/optimize your database. This ensures that your site keeps running at optimal performance. Neil Patel has a great infographic about how load time affects Google rankings.

    Step 1

    First we are going to grab the free WordPress plugin WP-Optimize, developed by Ruhani Rabin. As of writing this the plugin has over 500,000+ active installs with a 4.8 out of 5 star rating.

    wp-optimize plugin

    Be careful when searching for plugins that delete post/page revisions. Some of these plugins can cause a lot of damage. I have personally used this one on a lot of sites and can vouch for it and the developers. I have never had any problems with it. But as always I recommend backing up your database before running this plugin. (I personally use VaultPress so I never have to worry; on top of my host’s backups)

    Step 2

    Once you have installed it click into WP-Optimize on your sidebar within your WordPress dashboard.

    wp optimize delete WordPress revisions

    Step 3

    You now have a couple options. The most important ones here are “clean up post revisions” and also I recommend checking “optimize database tables.” You can also check the additional ones to clean up auto drafts, spam comments, etc. I personally always run the 5 options as shown below. When you are ready, click on “Process.”

    clean up post revisions

    You will then see a confirmation of the everything that has been deleted, such as post revisions, auto drafts, etc.

    confirmation of post revisions deleted

    And that’s it, your done! You can remove the plugin if you want. I usually install it to cleanup my WordPress revisions and then uninstall.

    I have seen dramatic speed increases by doing this on client’s sites that haven’t limited the number of revisions in WordPress. Some of them cleaning up more than 1,500+ revisions.

    As always feel free to comment below!

  • Usunięcie opinii z woocommerce w functions.php

    /*usunięcie opinii*/
    add_filter( ‚woocommerce_product_tabs’, ‚wcs_woo_remove_reviews_tab’, 98 );
    function wcs_woo_remove_reviews_tab($tabs) {
    unset($tabs[‚reviews’]);
    return $tabs;
    }

  • Usunięcie komentarzy do wordpressa przez functions.php

    https://dfactory.eu/turn-off-disable-comments/

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. Infekcje pharma, viagra w wordpressie
  2. regulamin konkursu jak stworzyć
  3. wordpress zawiesił się w maintenance mode
  4. Jak wykonać 2 kolumny w menu wordpress?
  5. wordpress: jak automatycznie wyświetlić child item w menu?
  6. Dodanie shortkodu kodem php, wordpress
  7. dostępne shortkody dla wtyczki Display Posts Shortcode
  8. zwiększanie wydajności wordpressa – ograniczanie treści PLUGIN WP-OPTIMIZE , image cleanup plugin
  9. Usunięcie opinii z woocommerce w functions.php
  10. Usunięcie komentarzy do wordpressa przez functions.php

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:

Advertisements

Skomentuj

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

Logo WordPress.com

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

Zdjęcie z Twittera

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

Facebook photo

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

Google+ photo

Komentujesz korzystając z konta Google+. Log Out / Zmień )

Connecting to %s