10 reputation
6
bio website
location
age
visits member for 3 years, 3 months
seen Jul 17 at 7:17

Apr
13
accepted Use a template file for a specific url without creating a page
Apr
13
comment Use a template file for a specific url without creating a page
Thanks for the reply, and sorry for the late answer. I used this solution and it works perfect. $url_path = trim(parse_url(add_query_arg(array()), PHP_URL_PATH), '/'); $templatename = 'retail'; $pos = strpos($url_path, $templatename); if ($pos !== false) {
Apr
1
awarded  Commentator
Apr
1
comment Use a template file for a specific url without creating a page
Thanks for your answer. I can not get the above code to work. This is never true: "if ( $url_path === 'retail' ) {" The $url_path is a string with the value: "example.com/retail";
Mar
30
comment Use a template file for a specific url without creating a page
I dont have access to the .htaccess file in this case. Is there any other way?
Mar
30
asked Use a template file for a specific url without creating a page
Mar
12
awarded  Student
Jan
5
awarded  Popular Question
Dec
2
awarded  Tumbleweed
Nov
25
revised Retina upload image function
corrected spelling
Nov
25
asked Retina upload image function
Feb
11
comment Disable default Wordpress widgets in sidebar
Thanks for the reply. I dont have a hardcoded function, i only use <?php dynamic_sidebar( 'sidebar-main' ); ?>. Could it be that when I activate a clean wordpress installation, and it uses twentyfourteen by default, it copies that theme's default widgets into my theme when I change to my theme under Apparence/Theme?
Feb
11
asked Disable default Wordpress widgets in sidebar
Apr
17
comment Make posts_per_page value the same on all pages
Hi Stephen and thanks for your detailed answer. I fixed all that you mentioned regarding the code. But if I just use the standard WP loop, and set Post per page in WP settings/read to 8, and have 1 sticky post in the db, the first page still shows 9 posts, the rest shows 8.
Apr
16
comment Make posts_per_page value the same on all pages
I would think that this would be a common problem. No one ever stumbled upon this before?
Apr
16
comment Make posts_per_page value the same on all pages
Thanks for your answer. The above code is in the index.php file. And then i use <?php get_template_part( 'loop', 'index' ); ?>to load how the content is shown. I Also have single.php, archive.php, page.php and so on to show a diffrent layout there.
Apr
16
awarded  Scholar
Apr
16
accepted Multiple loops on index page with sticky post and pagination
Apr
15
asked Make posts_per_page value the same on all pages
Apr
15
revised Multiple loops on index page with sticky post and pagination
Updated with the solution from @m0r7if3r