Pass extra parameter string in WordPress pagination [closed] - wordpress

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I want to include extra parameter string, i.e. param1=val1&param2=var2, etc in WordPress pagination.
For pagination I am refering the following site code:
http://callmenick.com/post/custom-wordpress-loop-with-pagination

You can pass as many as parameters inside the custom pagination function like the following :
function custom_pagination($numpages = '', $pagerange = '', $paged='' , $format='' , $tab = '') {
And pass the parameters via calling the function,
custom_pagination($queryvideos->max_num_pages,6,$paged3,'pagedvideo','videos');
custom_pagination($queryposts->max_num_pages,6,$paged2,'pagedpost','posts');
Refer the pagination example here : Link

Related

How to add custom parameter to amazon affiliate link for its value to be seen by GTM [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed yesterday.
Improve this question
(Please excuse me if I'm not phrasing anything right)
I followed a YT tutorial on how to add parameters to a url manually and to track them via GTM (Custom Variable > Variable Type = URL > Component Type = Query Key > abcd)
However when I enter preview mode, the string that I added to my amazon affiliate link (eg. &abcd=text) does not capture the value "text" and returns as undefined. What am I doing wrong?
I followed a YT tutorial on how to add parameters to a url manually and to track them via GTM (Custom Variable > Variable Type = URL > Component Type = Query Key > abcd)
However when I enter preview mode, the string that I added to my amazon affiliate link (eg. &abcd=text) does not capture the value "text" and returns as undefined. What am I doing wrong?

How to declare ID as number in Typescript? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I have been trying to use type number for the id of one of my entities and I get this error in typescript -
Type '{ id: number; }' does not satisfy the constraint '{ id?: string | undefined; }'.
Types of property 'id' are incompatible.
Type 'number' is not assignable to type 'string | undefined'.
I tried using Guid at first, but when I wanted to upload files to my entity, for some reason type Guid was throwing errors, and wasn't compatible with my SaveFile method. Is this fixable?
Thank you in advance! :)
The library you’re using is expecting the “id” to be a string, so you should just convert your number to string. As VLAZ mentioned in the comment, there’s no problem with the typescript, so it depends on you to adapt to it.
let idNumber = 5264;
const obj = { id: idNumber.toString() };

Show all my Folders from a Folder in Flutter Firebase Storage [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
Hey I use Firebase Storage as Backup Opportunity for my App and have a users folder. Inside this folder there are a lot of folders which's name is the UID from a User.
Example:
users/bahjdbhjabdjabggjd/file.txt
users/bhsabhadadnhbann/file.txt
users/hbashdbadjadjajdgg/file.txt
I need a opportunity to list all foldernames in a array.
Goal:
[bahjdbhjabdjabggjd, bhsabhadadnhbann, hbashdbadjadjajdgg]
I didn't found a way to solve my problem.
I suggest reviewing the documentation for listing files and folders. Just build a Reference to the prefix you want to query, and call listAll() on it. For exmaple, copying from the documentation:
Future<void> listExample() async {
firebase_storage.ListResult result =
await firebase_storage.FirebaseStorage.instance.ref("users").listAll();
result.items.forEach((firebase_storage.Reference ref) {
print('Found file: $ref');
});
result.prefixes.forEach((firebase_storage.Reference ref) {
print('Found directory: $ref');
});
}
It might also help to also record all your files in a database for easier querying, since the API of listing files is somewhat limited.

Why am I getting this error after installing a new theme on my WordPress site? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I installed this theme to a new Wordpress site and now I'm getting this error on my home page:
Warning: Missing argument 2 for wpdb::prepare(), called in /home/content/63/10275663/html/wp-content/themes/welcome_inn/library/tfuse_framework/functions/core.php on line 21 and defined in /home/content/63/10275663/html/wp-includes/wp-db.php on line 990
This is theme I installed: http://themefuse.com/wp-themes-shop/welcome-inn/
How can I resolve this?
Let's dissect the warning message. Three things to note; first, the function generating the warning (wpdb::prepare), second, where the error occurs (core.php) and the line reference. Let's take a look at the documentation for the wpdb class.
Here's the WPDB class on the codex. Searching through here, you'll see that the prepare() method does exactly that - prepares the query. Looking through the documentation, you'll see a very important line.
Please note: As of 3.5, wpdb::prepare() enforces a minimum of 2
arguments.
Ok, there's your error. Here's a link with more information.
Without going any further, I can almost guarantee that this theme hasn't been updated for 3.5. My suggestion to you would be to create a child theme and making an adjustment to the file at the line mentioned in the warning message. Going through the link, you'll see that prepare() works like sprintf so the change should be pretty insignificant. Here's an example:
$wpdb->prepare( "SELECT * FROM table WHERE id = $id" );
Would turn into:
$wpdb->prepare( "SELECT * FROM table WHERE id = %d", $id );
That should get you sorted out. Just a reminder, don't edit the plugin files directly. That may break your ability to upgrade the theme in the future.

I need a button to clear cells in a google spreadsheet [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Im making a tool for myself with Google Spreadsheets, and as part of that tool I would like to have a button that clears a specific set of cells. As I understand it, I need to insert a drawing, and then assign a script to that drawing. Trouble is, I dont know the first thing about writing my own so, im here looking for help!
The end goal of this would be for me to have a drawing with a script attached to it that would, when activated, clear the data (make them blank, but leave the color) from cells B7-G7.
Any help you guys could offer would be fantastic!
Such script is very simple, you should look at the tutorials to learn how to do it yourself.
Anyway, here it is:
function clearRange() {
//replace 'Sheet1' with your actual sheet name
var sheet = SpreadsheetApp.getActive().getSheetByName('Sheet1');
sheet.getRange('B7:G7').clearContent();
}
To add a custom menu to your Google spreadsheet, that when clicked, will list all your functions. See the code below
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var menubuttons = [ {name: "Clear B7-G7", functionName: "clearRange1"},
{name: "Clear B13-G13", functionName: "clearRange2"}];
ss.addMenu("Custom", menubuttons);
} // note you also have to have functions called clearRange1 and clearRange2 as list below
function clearRange1() { //replace 'Sheet1' with your actual sheet name
var sheet = SpreadsheetApp.getActive().getSheetByName('Sheet1');
sheet.getRange('B7:G7').clearContent();
}
function clearRange2() { //replace 'Sheet1' with your actual sheet name
var sheet = SpreadsheetApp.getActive().getSheetByName('Sheet1');
sheet.getRange('B13:G13').clearContent();
}

Resources