Search
Search Code
display a subnav for the current wordpress page
good if you are doing custom page work and need to show the current sub nav somewhere other than the main menu.
getcwd usage in php to get the current working directory for file includes
the builtin function getcwd in php gets the current working directory, this can then be used to include files or check the current working directory rather than manually adding the directory into your..
get current year in javascript
get and display the current year using javascript. a usage example would be adding the current year as a copyright to the footer of a page
share to linked in current url button with javascript
Share the current page url to linked in with a button and javascript
Get current URL and add a share to facebook share button with it
Combines this Facebook HTML for Sharing a Link and encode url with javascript this to make captan planet! Or... makes a share this post to facebook button.
show the current date in javascript
Returns the current date and time and sets the value in a div. Also added a demo with setinterval to update the time and date in the div every second.
views list function for checking what views have been made on the current week
this is related to the views class that i added with monthly week number and yearly views, this is the function that i use to extract the top viewed pages for the week num, month num and year num. I ..
get the current week as a number with php
retrieves the current week as a number from 1 to 52.
get the current working directory in php
gets the current working directory... in php
get the current month as a number
this will return the current month as an integer
get current url with php
this checks is $_SERVER['HTTPS'] is set and $_SERVER['HTTP_HOST'] $_SERVER['REQUEST_URI'] to construct the current url
check if a query string item is set in the current url
this will check and console log if a query string on this page is set to test=anything example url is: Test is not set: https://kruxor.com/view/code/XzLaT/ Test is set using & : htt..
checking the current url and then marking a link active based on that url
i want a script that can check the current page uri and then match it to a list of links to be able to add an active class that survives page reloading So here we go... 1. Get the current page url. ..
get the current post id from content.php
this should assign the current wordpress post id to $post_id, from template-parts/content.php if you want to show it, just echo the $post_id
wordpress get the current category id name and slug
This gets and displays the current category id in a wordpress blog post if you have the current id, if not you can leave the $post_id blank and it should see if there is a category loaded to the curre..
get the current url in javascript
this will get the current address add it to a variable and show it on the result element
create a mysql or sqlite current timestamp with php
just in case you need to create a CURRENT_TIMESTAMP using php, this formats the current date into the following.
get current class name with get_class
This will return the current class name, can be used in side a function of the current class object or give it another object name to return. class myclass {function myfunction() {echo get_class($thi..
Get Current Page URL PHP
There is a few methods of getting this but here is a simple one. Replacing the http or https manually. $current_url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; Here is a more complex ..