This is still present to 2.4.1. Two not needed and totally irrelevent links. See my capture.
Thanks
Heya –
I seriously love what you have created with AnsPress, very happy to have found it!
I do however run into a few issues/bugs – mainly with how things display:
Notification tab:
https://www.evernote.com/l/AGJgL66ZjYxK_atbN3UWFix7Skd-NubGqR8
Responsiveness (in profile page):
https://www.evernote.com/l/AGJcdTO-qOVOeL3eFF8VHyG7gObbyr_guRE
Mentions:
When I type @username or anything, it doesn’t give any ‘feedback’ or auto-suggestions – or am I doing something wrong? ;p
Keep rocking
–Nick
Currently AnsPress routing implemented like this:
if ( ! ap_opt( 'question_permalink_follow' ) ) { $new_rules[$question_slug.'/([^/]+)/page/?([0-9]{1,})/?$'] = 'index.php?page_id='.$base_page_id.'&question_name='.$wp_rewrite->preg_index( 1 ).'&paged='.$wp_rewrite->preg_index( 2 ); $new_rules[$question_slug.'/([^/]+)/?$'] = 'index.php?page_id='.$base_page_id.'&question_name='.$wp_rewrite->preg_index( 1 ); }
As you all can see, all routing is leading into the “base page” which is the page you have your [anspress] on, which you selected in AnsPress Options as “Base page”.
This raises few severe issues:
- All that ANSPRESS_TITLE story that was lasting through this Q&A.
- It is not possible to simply edit the question by pressting “Edit page” in wp-admin menu bar (it may be required to change a title, or embed some prohibited otherwise HTML; pressing Edit from the interface does not solve it, to begin with, it doesn’t work!)
- It is a source of failure of addons like Add Meta Tags.
This is fundamental. Not even wordpress knows current page is not the “base page” but one of custom posts, “question”.
WordPress supports this kind of routing out of the box, it could all just work, if implemented just a bit different way. Here, I look at the sources of Easy Affiliate Links (just a plugin which I know is capable of utilizing custom urls, like http://localhost/customslug/custom-post-name/) as far as I understand, registering custom routes/rewrites should be as easy as
public function register_post_type() { $slug = EasyAffiliateLinks::option( 'link_slug', 'recommends' ); $name = __( 'Affiliate Links', 'easy-affiliate-links' ); $singular = __( 'Affiliate Link', 'easy-affiliate-links' ); $args = apply_filters( 'eafl_register_post_type', array( 'labels' => array( 'name' => $name, 'singular_name' => $singular, 'add_new' => __( 'Add New', 'easy-affiliate-links' ), 'add_new_item' => __( 'Add New', 'easy-affiliate-links' ) . ' ' . $singular, 'edit' => __( 'Edit', 'easy-affiliate-links' ), 'edit_item' => __( 'Edit', 'easy-affiliate-links' ) . ' ' . $singular, 'new_item' => __( 'New', 'easy-affiliate-links' ) . ' ' . $singular, 'view' => __( 'View', 'easy-affiliate-links' ), 'view_item' => __( 'View', 'easy-affiliate-links' ) . ' ' . $singular, 'search_items' => __( 'Search', 'easy-affiliate-links' ) . ' ' . $name, 'not_found' => __( 'No', 'easy-affiliate-links' ) . ' ' . $name . ' ' . __( 'found.', 'easy-affiliate-links' ), 'not_found_in_trash' => __( 'No', 'easy-affiliate-links' ) . ' ' . $name . ' ' . __( 'found in trash.', 'easy-affiliate-links' ), 'parent' => __( 'Parent', 'easy-affiliate-links' ) . ' ' . $singular, ), 'public' => true, 'exclude_from_search' => true, 'menu_position' => 20, 'supports' => false, 'taxonomies' => array(), 'menu_icon' => EasyAffiliateLinks::get()->coreUrl . '/img/icon_16.png', 'has_archive' => false, 'rewrite' => array( 'slug' => $slug ) ) ); register_post_type( EAFL_POST_TYPE, $args ); }
Notice the ‘rewrite’ => array(‘slug’ => $slug), and the wordpress function that registers it, register_post_type.
It should be completely possible to display AnsPress questions natively, as they are a custom posts already. It will solve all the current and future issues related to non-standard routing. I don’t see any reason to not use the default wordpress solution here.
Please comment, @AnsPressTeam, @Rahul.
Is there a function that brings up each page? For example the ask question page or the questions list page. I see that there is a register_common_pages function where you can register the page and that this function runs on the “init” action hook, but when do you actually call and load ask.php??
I followed all installation instructions exactly. When I attempt to type into the ‘Ask Question’ page text fields nothing happens. Also when I try to upload an image the spinner indicator spins but no image is displayed. I am using Genesis, Bulletproof Security and Wordfence.
How can I see all reputation points?
thank you
How can install AnsPress default theme?
I created an new folder ‘anspress’ undeer wp-content\theme\anspress and copied the files as mentioned in the Theme Override section. But, could not load the them.
The error says Sytle.css is missing.
Please suggest.
How to remove “Question Statistics” and “follow button” widgets from question page?
Change, please, russian translation for this words – see picture.
Why “Ask Question” and “Sort by” fields are so ugly aligned on question page (see pic)?
Today I added images to the category which looks great in the category page. But the same large image is also showing in the category widget which is looking odd in the widget, also because of the image above the category name the category widget is stretched too long down to the bottom.
So I want either to remove images from the category widget or shorten it to fit side to it just like what it was when images were not added(to the size of folder icon when images were not added).
What to do? Please help!