Solution
I used the wordpress-theme-showcaseplugin to show a list of themes in the home page, and to can easily browse the theme that is currently preview I changed the way wordpress handle the permalinks.
In the wp-includes/link-template.php file in get_permalink function added this code
if(isset($_GET['preview_theme'])){
$permalink = home_url('?preview_theme=".$_GET["preview_theme'] .'&p=' . $post->ID);
}else{
$permalink = home_url('?p=' . $post->ID);
}
and in _get_page_link function added this code
if(isset($_GET['preview_theme'])){
$link = home_url("?preview_theme=".$_GET['preview_theme'] ."&page_id=$id");
}else{
$link = home_url("?page_id=$id");
}
Hope this will be useful for any one will get this problem.
Related Posts:
- how to stop a gallery slideshow
- how do you add a gallery to the homepage without using a post or page?
- Changing admin Textarea to integrated WP editor
- Using OOP in themes
- How can I allow the Editor Role to change Theme Settings?
- Best way to include Bootstrap in WordPress
- Undefined offset: 0 in > […] /wp-includes/capabilities.php on line 1067
- Editing Links in the Footer of WordPress Themes with Base64 Encrypted Code?
- register_theme_directory and broken deploys
- switch a theme different per user role
- How to make alert for new version on theme options?
- Can we create a child theme for a premium child theme built on Genesis framework?
- Migrating October CMS to WordPress
- Change logo on each page of University Hub theme [closed]
- Delete database tables on theme uninstall?
- Why are my sidebars not registering in unit tests
- How do you manage your theme versions when privately distributing?
- wordpress themes demo file importing problem? [closed]
- How to run word press theme on localhost in Ubuntu OS?
- get_template_directory has an odd functionality
- Theme editor not showing correct index.php
- How to start learning CSS and theme development?
- Confit theme on WordPress.org
- How to set different settings for a mobile theme?
- How to set a single theme directory on a multisite blog?
- PHP Parse error: syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) on line 230 [closed]
- What’s the proper way to include inlined javascript-source?
- Create register form without a plugin
- Retina JS not working
- Get WordPress to use another custom “author.php” file (“custom-author-file.php”)
- wp_add_inline_style() not working?
- JavaScript Files Registered in Parent Theme Won’t Load When Calling wp_enqueue_script() in Child Theme?
- WP can’t create new directory
- Is it possible to create child themes using the WordPress Dashboard?
- Can I use wordpress themes without wordpress?
- Unwanted edit link on front page
- Need help with making a website where user can add products
- Determing number the query ran by core wordpress
- Preserve theme settings when migrating from local to live
- Unable to access wordpress login.php [closed]
- What is the “pub” theme? [closed]
- Can I change the WordPress default color?
- Enqueue custom css file on specific page
- How to put single-***.php in a specific folder?
- Recommended Media Size for Twenty Fourteen
- Using JQuery to check for Rel Attribute of Image before Overriding It
- for my current theme( own custom ) the default menu options are disabled in wp-admin?
- Most wp_nav_menu parameters ignored
- Is a very simple theme secure enough?
- New WordPress Theme Not Showing in Blog
- A wordpress site keeps editing wp-content files after migration
- Switching Theme and back will reset the previous Theme’s settings?
- Using Grunt and keeping theme comments
- Remove Commenting on Certain Pages
- Where did my Theme Editor go?
- how would I change background color of a theme using a plugin?
- Blackberry mobile theme redirection
- What’s the easiest way of adding more options in the Theme Options of the twenty eleven theme?
- Fix warning: Missing argument
- My first WP development project – am I envisaging this right?
- How can I fetch the next level of the currently selected main menu (hierarchical menu)?
- I’ve got a theme I can’t update and won’t let go
- Removing basic header/text elements from a theme
- WordPress keeps switching back to empty template
- Best way of creating a website with multiple themes/languages
- how to get json file in wordpress template
- Website Theme Flickering in Chrome
- Enqueue All Stylesheets Found In a Theme Folder
- Problem: Fatal error worldpress theme
- style.css of my custom theme is not being applied at all
- The function is deprecated; use mysql_real_escape_string() instead
- how to edit homepage
- WordPress loads old style.css, then loads current one
- WordPress Dashboard Problem [closed]
- 1px black line appearing down right side of thumbnails (theme snaps) [closed]
- Change wordpress theme name (not child theme)
- Full width background slider
- Custom theme being prompted for update because of similarly named theme
- the_content doesn’t return tags
- WordPress Theme Migration Local to Live Assets Not Loading
- Revamping a WordPress mirror site – and I don’t know where to start!
- Adding admin-ajax.php to the frontend. Good or bad idea?
- WordPress Form To Email.php and Theme
- How do you make your theme Child Theme-able? [duplicate]
- How to prevent tinyMCE editor to be loaded completely in Text Editor?
- Customising a theme
- Blog shows up without Theme/CSS styles
- Boldy theme – Regarding the images above the boxes
- Symbolic Links for themes – linking one theme to many wordpress installs
- Fatal error: Call to undefined function get_header() and BuddyPress [closed]
- A problem with functions.php file on my WordPress site
- hardened wordpress linux install
- which theme is this? [closed]
- JQuery Error in theme for .live is not a function [closed]
- How can I either move the nav bar down or create more space for the header? Theme – Ajaira
- WordPress Theme redirects to the Index page – Theme customizer problem
- How to assign posts to different themes? [closed]
- Using AJAX to Update WordPress Theme
- Disabling Full Site Editor (FSE)
- get_post_meta() doesn’t allow email