K
K
khodos_dmitry2017-07-26 15:20:04
Python
khodos_dmitry, 2017-07-26 15:20:04

How to edit redirects in Wordpress?

It happened that when moving pages from category to category, we got endless redirects.
Those. page 1 - page 2 - page 1.
How can I fix this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
antoremin, 2019-02-21
@e_butcher

Hey! If I understood everything correctly, and we are talking about the first task (just in case, I attached a screenshot of the first task), then there is no need for a cycle, you need to add the precode that was in the task so that it meets the three conditions from the task.
The precode looks like this:
```
print('|{}|'.format('Heart'))
````
To do this, you need to enter the necessary parameters inside curly braces.
An example from the theory for this lesson:
```
print('|{: <20}|'.format('I'm grinning'))
```
With these parameters (space, less than sign, 20), calling the print function will output to screen the value in the cell, left-aligned, with a cell width of 20 characters, and fill the gaps with spaces.
In the task, you need to do the same,
But judging by the code, this is not about the first task, but about the third (screenshot below).
In the third task, you need to display a beautiful tablet on the screen, with a fixed column width and readable data: text on the left, numbers on the right.
The precode in the task is as follows (omitted `data=...`)
```
print('Emoji name | EmojiXpress, mln | Instagram, mln | Twitter, mln')
print('----------- -------------------------------------------------- ------')
for row in data:
# You can pass multiple # arguments to the format() function
and specify how to display it for each one.
# Write formatting code instead of ellipses.
print('{...} | {...} | {...} | {...}'.format(row[0], row[1], row[2], row[3]) )
```
Two calls to `print()` with regular strings is just a table header, you don't need to touch it.
Next comes the loop, which goes through the data plate line by line, takes the values ​​​​from each column (name of the emoticon, number, number, number) and prints them to the screen.
To make the plate beautiful, you need to replace the ellipsis in curly brackets with the parameters specified in the task: the first column is left-aligned and has a width of 20 characters, the rest are right-aligned, 16 characters wide.
If we are talking about the third task, I recommend taking this precode, replacing it with your code and adding parameters. True, you will have to manually set the indents after the start of the cycle (the lines after `for row in data:`), otherwise the python will not understand that the cycle has begun further.
And the Workshop has support that helps with such questions, they usually answer in 10-15 minutes.
https://yandex.ru/support/praktikum/feedback.html

W
WordPress WooCommerce, 2017-07-26
@maxxannik

You must first understand how you could drag pages between categories. You can't do that out of the box. There is no black magic here. This time.
And two - without a link to a specific site or without details, it's hard to understand how much. We'll have to wait for telepaths. Not the fact that they will appear in the next 100 years.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question