Reference Base URL in Wordpress - php

I am working with a plugin that autogenerates a page in Wordpress.
The "Event" plugin creates a new page with slug "events". The page is not registered in the "list of pages".
I need to add the events page to the main menu.
My problem is when I go to the appearances->menu, there is no element in the list of pages to add to the menu. The only way to add the item is to manually create the link in the "custom link".
If I'm going to do this, is there any way to parameterize the baseurl? for example: instead of using link "HTTP://homepage.com/events", I'm looking for "{{ base URL }}/events"
Is this possible? if so, how?
Thank you

Related

WordPress: Adding home page (=latest posts page) to navigation properly

I have a WordPress template displaying the latest posts on the home page (www.mydomain.bla) as it is the default setting in WordPress:
Now, I want to add a link referring to my home page in my navigation (with Appearance -> Menus). The only way I found to do this is by adding a custom link referring to my domain.
Here's my problem:
Even though the link itself does the job, one thing is not working. When navigating to a single post (like www.mydomain.bla/a-single-post) the needed classes indicating the parent link (current-post-ancestor current-menu-parent current-post-parent) do not appear to a custom link like they would to if I had a "Post page" which is not the Homepage.
Is there a way to add a link referring to my posts-showing homepage properly?
Thanks a lot for your help!
Create a new template named "Our blog" and paste the code for posts in this template. Now add a new page named "HOME", select OUR BLOG template and publish the page. Now go to the reading section under the setting tab and change the setting from your latest posts to a single page and select your HOME page.
Now you can add page rather than adding a custom link in the menu.

How to get seo friendly article url in joomla without assiging it to any menu

I am a wordpress developer and new for Joomla cms. Currently i am working on a Joomla project.
I have created articles from admin section and i want to call those articles in my front end with seo friendly url(http://www.example.com/article-alias) without assigning it any menu.
I am already using url like this /index.php?option=com_content&view=article&id=article_id to get article in front end.
Thanks in advance for any suggestion or solution.
In my Joomla instance I created a new menu called "blank" to put any articles I wanted to link to directly instead of adding them to the navigation on the site. I assigned my articles to that menu, and there is a field called "alias", manually type in the name you want to appear in your URL (like article-alias). Then you can link directly to that page with example.com/article-alias. This will also allow you to add modules to the page from the module manager and selecting your articles from the "blank" menu.

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.

create a function in header.php

i created a wordpress website theme and i want to create a function in the header.php that function should create a menu of one link that can be changed by using any way like for example widget
this is the link :
<li>arabic</li>
and i want the function to let me change the url to go to page
like when i am in "contact-en" page the url of the link should be "contact-ar"
and when i am i page "contact-ar" the link should be "contact-en"
Why don't you use Menu for WordPress?
To use this, go to "Appearance" -> "Menus".
Make a menu with any name. Select the menu from "Main Menu" and save it.
Put your link under "Custom Links" and the text you want to show under "Label" and click on Add to menu. Repeat this process until all are put. Then save it and the menu will appear now in your header menu.
Ask me if you have any further questions regarding this topic.

wordpress - add new category based admin panel menu tab

i want to show a new admin menu tab which will pull information from a certain category, i.e products.
I do not want to use custom Post types because i want to be able to change themes with out any modification to theme files, so please do not recommend that.
using wordpress function add_menu_page() i can add a new tab, but how to show new post page and existing posts of that category, exactly like custom post type.
thanks
Did you try the Menus?
If I'm not mistaken, what you want to do is to create a menu tab that can fetch the posts from a certain category
Create a post with your category
In your dashboard go to the Appearance > Menus
Name your Menu, after creating your New Menu
You can select what you want to add on that Menu
by checking it and clicking Add Menu, the Categories
are on the bottom part.
You should try to create your custom post types as part of a plugin anyway, as that's what WordPress recommends:
https://codex.wordpress.org/Post_Types#A_word_about_custom_post_types_as_a_plugin
That way you can them with any theme.

Categories