Wordpress search results to show breadcrumb without link - php

We use WordPress default search widget on our site. It shows search results using content-search.php. And everything is working fine.
Because the site is big we sometimes have duplicate page names. So we need search results to show breadcrumb type of "trail" between title and excerpt. We don't want it to be a clickable link.
Like this:
Page1 > Page2 > Page3
This is a school project so our coding skills are limited but we have a basic understanding. We are in need of a bit of code that prints breadcrumb, like above
We could not find an answer to this problem anywhere else.
EDIT: Sorry. Plugins are out of the question

Try breadcrumb-navxt plugin and in your search result page put this code where you want to display the breadcrump..
if(function_exists('bcn_display'))
{
bcn_display();
}
You have to modify the breadcrumb according to your need in the settings panel..

Related

How to switch off modules on homepage with smartsearch in Joomla 3.4

I am currently building a joomla site (version 3.4) and I have an issue when I search for something on the site.
Currently the search results are shown right at the bottom of the page under all the modules that I have for my homepage.
What I was looking to find out is how I could switch off some modules so that the search results could be displayed a lot higher than they currently are.
Would appreciate some advice on how to do this as not something I have done before.
If you have not a dedicated menu item for search (no matter it's hidden or visible), the search result will be shown at the home page with a query string after index.php. To get rid of the home page content from the search result, you can simply create a menu item for search component. So, the result will be shown at that page further. This way you can also manage which modules must be show up or hide at that page.

Dynamic link to page in Wordpress

So I'm attempting to create a dynamic WordPress link that displays within a post which would change according to the subject page that displays that post.
The link is displayed in a Bootstrap breadcrumb list. I'm using the WordPress "Content View" plugin to gather all posts of a given category ex. "Public Space", and display them on a specific "Public Space" page I've created within WordPress.
The dynamic link currently in use displays the proper title of the category of post being viewed, "Public Space", but it links back to the specific category page instead of my "Public Space" page that uses the proper formatting I need through the "Content View" plugin.
Is there any way to accomplish this without creating individual .php page files for each subject?
Any help would be greatly appreciated!
Here's my code for the breadcrumb:
<?php the_category('title_li='); ?>
Link to the website post with the dynamic breadcrumbs:
http://parkerrichard.com/wordpress/public-space/judgement/
Link to the page the "Public Space" breadcrumb should dynamically link to (and change depending on the post category):
http://parkerrichard.com/wordpress/public-space
Thanks,
Parker
Sorry, I didn't read your post fully. Your problem is you're using a plugin to do templating work, when you could edit the "category.php" page to look like you want.
But if you have to use the plugin, then try this:
Go to Settings > Permalinks in your admin menu.
Then set your permalink structure to custom, and put this in the box:
%category%/%postname%
Then underneath that in your category permalink name field, put a single period - .
Now your category permalinks will have: http://yoursite.com/wordpress/category-name/ instead of yoursite.com/wordpress/category/category-name/
They should link up to the right place now.

Edit WP html code, but cannot find the page

I am new to Word Press and I have been assigned to change something at work in our homepage.
I am always worked with raw HTML/CSS/php files, so I am a bit out of place here.
The page in question is the following: GAN Integrity Solutions Products
Inspecting the html I found where the CSS is (in the theme folder).
If I go in word press under pages, and I choose Products (which is the page I want) there is not content in it even in the text or visual editor. (but the page does indeed have content)
I installed the plugin called "Always edit in HTML" but it only removes the Visual tab and does not really replace it with the HTML tab (like I have seen a friend of mine has).
Also I am currently using WP v. 3.7.1 and I have not update because I still had to learn what happens when one updates (does it screw up my site? I can't afford to screw it up).
Anyone have any idea of what I am doing wrong or how I can solve this?
Btw the different "products" are created individually under "Portfolio" but what I would like to edit is that first link page html. What I need to do is instead of having pictures in the "squares" and then text as ones mouse over them, the reverse.
I would appreciate it!
Can you try to login in Wordpress?
You should go to pages and search for the product page.
Then check the template part.
Go to your themes map again and search for that template.
Your code should be there.
This is my first comment. Hope it is helpfull.

Wordpress Link Items to Display in Parent Sidebar

I have created a menu like so... http://tinyurl.com/p5xr852
You can see I have added links under "What's Happening?" which I want to use as page anchors from a sidebar.
What I need to do is have these items list in a sidebar when on the parent page.
I have done a heap of research and found that wp_get_links is now deprecated (see here http://codex.wordpress.org/Function_Reference/get_links)
Apparently this has now been replaced with wp_list_bookmarks()
Is there any way what so ever to do this? I don't want to go down the route of creating a heap of multiple menu's as I will be adding these links under post pages to act as page anchors.
I hope I understood correctly. You want that list of links displaying on the sidebar, when the user is in "What's Happening" -page OR any of it's child-pages?
If I didin't understand then just skip this but.
Create a new text widget that has your pages as a list like this:
<ul>
<li>Overview</li>
<li>Schedule</li>
<li>etc</li>
<li>etc</li>
<li>etc</li>
<li>etc</li>
</ul>
Then get the Widget Logic plugin: http://wordpress.org/plugins/widget-logic/
This plugin allows you to choose where widgets appear, for example in certain pages, in archives, in certain languages, in child-pages etc.
Check out: http://wordpress.org/plugins/widget-logic/other_notes/ on how to make this link-list-navigation-widget to appear on the pages you want it to.
It's something like
global $post; return (is_page('15') || ($post->post_parent=="15"));
You put the ID of the page on which you want the widget to appear on. And its child-pages with the latter.

WordPress - Cannot get custom fields to show on home page

I am trying to add the custom field "market" into the a href as links, which is working great on pages, however is not working on my home page.
The PHP is identical for both.
For the home page, the php is in the functions.php file, and for the theme-by-series page the PHP is in the page's .php file.
The page works, so it doesn't seem to be anything wrong with the PHP, seems more like it for some reason is not targeting the post id as it should.
Anyone know how to solve this?
Custom fields are saved per post/page, and this is likely why it's not loading on your index.php page. You need to replace $post->ID with the ID of the post/page you want to show your custom field for - the $post object is available on the page.php and single.php templates, which is why it works there. On the index page, it would only be available inside the loop.
Look up the WP Docs on how to Reset the main WP Loop Query:
http://codex.wordpress.org/Function_Reference/wp_reset_query
If you're getting different results in functions.php vs a page template, there's a good chance its because your page template has already started a query loop and its conflicting somehow. This is just off the cuff without looking at the code. I'm going by your description of the difference betweeen working and non-working models.

Categories