Home › Forums › Free Themes › Education Hub › Adding a link to News or Events caption on main page
- This topic has 11 replies, 2 voices, and was last updated 7 years, 6 months ago by wensolutions.
-
AuthorPosts
-
May 5, 2017 at 3:06 am #41726serdarangun@gmail.comParticipant
Hi,
How do I add a link to news or events section’s caption on main page? Thank you
May 5, 2017 at 4:41 am #41737wensolutionsKeymasterHello @serdarangungmail-com,
To link the caption of news and event section you need to activate the child theme .
Child theme references :
https://codex.wordpress.org/Child_ThemesYou can also create the child theme using the plugin. Below is the link to one of them.
https://wordpress.org/plugins/wp-child-theme-generator/
After activating the child theme , in your child themes functions.php file paste below given code:
https://gist.github.com/anonymous/f128d8b263107a332b8d760f057461ab
Hope this helps.
If you need any help further, please let us know.
Best Regards!!
May 5, 2017 at 4:52 am #41741serdarangun@gmail.comParticipantThank you for your quick reply. I did not install child theme. Can I apply it without having child theme?
May 5, 2017 at 7:33 am #41763wensolutionsKeymasterHello @serdarangungmail-com,
Child theme is recommended way of modifying an existing theme.
If you modify a theme directly and it is updated, then your modifications will be lost and not only this you can modify any function by using child theme .
So it is strongly recommended to use the child theme for any modification.
Hope this clears up the confusion.
Best Regards!!
May 6, 2017 at 6:42 am #41809serdarangun@gmail.comParticipantI copied and pasted the code given. It did not work. Is there any spesific place I should paste the code in functions.php file? Is there any place I should edit the code given? Thank you for your help
May 6, 2017 at 11:29 pm #41851wensolutionsKeymasterHello @serdarangungmail-com,
We have tested the code we have provided locally and it is working absolutely fine .
Please make sure you have copied the code correctly and paste it in your child themes functions.php file .
The code links the excerpts of the news and events section of the front page .
Also please share your site URL so that it would be easier for us to inspect your issue further .
Hope this helps.
Best Regards!!
May 16, 2017 at 3:51 am #42614serdarangun@gmail.comParticipantHere is the link : http://www.fonokoleji.k12.tr/ I copied and pasted the code given at the end of the function.php file.
May 16, 2017 at 4:06 am #42615wensolutionsKeymasterHello @serdarangungmail-com,
As we have inspected your site URL the code we have provided is also working in your site . Refer to below gif :
http://imgur.com/a/EJMGvWe have linked the content as you have told. If this is not where you meant then please provide the screen shot marking the area you want to link .
Hope this helps.
Best Regards!!
May 16, 2017 at 4:35 am #42616serdarangun@gmail.comParticipantSorry, I could not make my point clear. In the url, we have news (Haberler), and events (Duyurular) caption. We want to link on news caption (haberler in turkish) to all news page: http://www.fonokoleji.k12.tr/category/haberler/
We want to link on events caption (duyurular in turkish) to all events page:
http://www.fonokoleji.k12.tr/category/duyurular/May 16, 2017 at 5:07 am #42624wensolutionsKeymasterHello @serdarangungmail-com,
We apologize for the confusion.
Please replace above given code with the code given below .
https://gist.github.com/anonymous/c320b9e3f617b6a6e71e84ad9e6b70e7
Hope this helps.
Best Regards!!
May 16, 2017 at 5:38 am #42630serdarangun@gmail.comParticipantCan you check our url again, it didnt work
May 16, 2017 at 6:05 am #42632wensolutionsKeymasterHello @serdarangungmail-com,
As we have inspected your site URL we found that you have included the code we have provided .
Also, you have not activated your child theme . If you directly paste those code in your parent theme functions.php then it might not work or will generate error .
So, please create a child theme from the plugin given below:
https://wordpress.org/plugins/wp-child-theme-generator/Now paste given code in your child themes functions.php file .
https://gist.github.com/anonymous/c320b9e3f617b6a6e71e84ad9e6b70e7
Hope this helps.
Best Regards!!
-
AuthorPosts
- You must be logged in to reply to this topic.