Архив рубрики: Публикации

Спрятать автора постов WordPress

По дефолту неумный ворлдресс светит логин пользователя в URL автора каждого поста. Чтобы это убрать: в дочерней теме, в файле functions.php пихаем: Читать

Smileys in WordPress: a guide to remembering codes

wordpress-smiles-paper

Memo for remembering WordPress emoticons

Faced with the need to put graphical emoticons in WordPress instead of the beloved brackets (brackets.com does not approve!).

 

Graphic emoticons are very fruitful for the site’s position in search engines, while symbols confuse unfortunate googlesiders and other search fiends.

 

Of course, the excessive use of graphics, your site is in danger of becoming a Christmas tree, so do not persist. Another way – use a verbal expression of emotion hehe, but I prefer emoticons 😀

 

In general, not to suffer, prepared a table of characters, which can be printed out and used as a memo.

 

UPD: for newbies – to save the picture: PKM (right-click) on the picture and “save picture as… 😉


[solution] WordPress: css template editing problem

Funny thing – when you edit wordpress templates ccs (and other CMS) in Google Chrome – often the cache glitches, and as a result, when you refresh the page changes are not visible. I did not understand what’s wrong until I refreshed the page cache (Ctrl+F5).

 

In other browsers (fox, for instance) it’s OK; knows when to refresh what. By the way, chrome glitches permanently in terms of caching – it can be seen in YouTube, where the bar “… begins live broadcasting” is often lit on old videos, although there is no broadcast. I wrote to google support about a year ago – they know about the problem, but so far they are not scratching.


[решение] WordPress: проблема с редактированием css шаблона

Забавная штука – когда редактируешь ccs шаблонов wordpress (да и других CMS) в Google Chrome – часто глючит кэш; в итоге, при обновлении страницы внесенные изменения не видны. Я долго не врубался в чем дело, пока не допер обновить кэш страницы (Ctrl+F5).

В других браузерах (лиса, к примеру) все ок; знает, когда-что обновлять. Кстати, хром глючит в плане кэширования перманентно – это видно на ютубе, где часто на старых видосах горит плашка “… начинает прямую трансляцию”, хотя никакой трансляции нет. Писал в саппорт гугла где-то год назад – знают о проблеме, но пока не чешутся.


Remove Category Archives or Category Archive in the WordPress archive

Also often encountered a problem faced by novice users of WordPress – How to remove the Category Archives at the top of the page? In the Russian version, this inscription sounds like “Archive for category”; and in some versions / templates, this line in WordPress can be as follows: Archive for category.

 

In general, no matter what the string, the treatment is simple:

Читать

Python: Задачи и решения (Глава 3. Ветвление, циклы с оператором while и псевдокод. Игра “Отгадай число”).

Продолжаем изучать программирование. После третьей главы в книге: Майкл Доусон “Программируем на Python”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition), где я изучила особенности работы с текстом в языке программирования Python, предложены задания. Давайте выполнять их вместе. Я приведу свой вариант решения, а вы пишите ваши варианты в комментариях.

Программа “Угадай число” от Игроглаза, не подсматривая решение:

import random



guess = ""

guess_num = 0

number = int(random.randint(1,100))



print ("I made a guess: number 1-100. Can you guess it?n")



while guess != number:

    guess = int(input("Enter your proposal: n"))

    if guess > number:

        print("No, it's smaller..n")

    elif guess < number:

        print("No, it's bigger..n")

    else:

        print("Finally, you got it!n")

    guess_num += 1



print ("Number was ", number, ". You guessed it with", 

guess_num, "times. Good job!")

    

input()

Кстати, в книге в этой программе ошибка. Вне цикла там стоит tries = 1; тогда как оно должно начинаться с нуля.

1) Напишите программу — симулятор пирожка с «сюрпризом», — которая бы при запуске отображала один из пяти различных «Сюрпризов», выбранный случайным образом. Читать